| File was renamed from src/main/java/com/dji/sample/patches/controller/DemoController.java |
| | |
| | | package com.dji.sample.patches.controller; |
| | | |
| | | import com.dji.sample.patches.service.impl.DemoServiceImpl; |
| | | import com.dji.sample.patches.service.impl.ShpToDataSourceServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 { |
| | | public class ShpToDataSourceController { |
| | | @Autowired |
| | | private DemoServiceImpl demoServiceImpl; |
| | | private ShpToDataSourceServiceImpl shpToDataSourceServiceImpl; |
| | | @PostMapping("/getGeo") |
| | | public void getGeo (@RequestParam("file") MultipartFile file) throws IOException { |
| | | demoServiceImpl.insertGeo(file); |
| | | shpToDataSourceServiceImpl.insertGeo(file); |
| | | } |
| | | |
| | | |