| | |
| | | |
| | | import com.dji.sample.patches.service.impl.DemoServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | |
| | | import java.io.File; |
| | |
| | | import java.io.IOException; |
| | | |
| | | @RestController |
| | | @RequestMapping("${url.patches.prefix}${url.patches.version}") |
| | | public class DemoController { |
| | | @Autowired |
| | | private DemoServiceImpl demoServiceImpl; |
| | | @GetMapping("/getGeo") |
| | | public void getGeo (File file) throws IOException { |
| | | @PostMapping("/getGeo") |
| | | public void getGeo (@RequestParam("file") MultipartFile file) throws IOException { |
| | | demoServiceImpl.insertGeo(file); |
| | | } |
| | | |
| | | |
| | | } |