fix:增加扫描mapper

This commit is contained in:
“袁杰” 2021-07-27 20:23:54 +08:00
parent bf6be211c3
commit e7e8b6a9fd
3 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package cn.axzo.oss.client;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -13,6 +14,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
*/
@Slf4j
@SpringBootApplication(scanBasePackages = {"cn.axzo.oss"})
@MapperScan(basePackages = {"cn.axzo.oss.dal.mapper"})
public class Bootstrap {
public static void main(String[] args) {

View File

@ -5,6 +5,7 @@ import cn.axzo.oss.http.model.ServerFileDeleteRequest;
import cn.axzo.oss.http.model.ServerFileUploadRequest;
import cn.axzo.oss.http.model.ServerFileUploadResponse;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@ -20,6 +21,8 @@ import javax.validation.Valid;
@RestController
public class ServerFileController implements ServerFileServiceApi {
@Override
public CommonResponse<ServerFileUploadResponse> upload(@Valid @RequestBody ServerFileUploadRequest request) {
return null;

View File

@ -5,6 +5,8 @@ import cn.axzo.oss.http.model.ServerFileUploadRequest;
import cn.axzo.oss.http.model.ServerFileUploadResponse;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@ -27,7 +29,7 @@ public interface ServerFileServiceApi {
* @param request
* @return
*/
@RequestMapping(value = "/upload", method = RequestMethod.POST)
@PutMapping(value = "/upload")
CommonResponse<ServerFileUploadResponse> upload(ServerFileUploadRequest request);
/**
@ -35,7 +37,7 @@ public interface ServerFileServiceApi {
* @param request
* @return
*/
@RequestMapping(value = "/upload", method = RequestMethod.POST)
@DeleteMapping(value = "/delete")
CommonResponse delete(ServerFileDeleteRequest request);
}