Yangyz 2 jaren geleden
bovenliggende
commit
060dc9a701

+ 6 - 0
Dockerfile

@@ -0,0 +1,6 @@
+FROM openjdk:8-alpine
+MAINTAINER Yyz
+COPY ./target/dist /root/server
+WORKDIR /root/server/burialPoint
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","app.jar"]
+

+ 3 - 10
src/main/java/com/benyun/controller/ApplyController.java

@@ -7,15 +7,7 @@ import lombok.RequiredArgsConstructor;
 import com.benyun.entity.Apply;
 import com.benyun.service.ApplyService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.beetl.sql.core.engine.PageQuery;
 
 import java.util.List;
@@ -27,6 +19,7 @@ import java.util.List;
 @RestController
 @RequestMapping("apply")
 @RequiredArgsConstructor(onConstructor_ = {@Autowired})
+@CrossOrigin
 public class ApplyController {
     /**
      * 服务对象
@@ -52,7 +45,7 @@ public class ApplyController {
     public Result<List<Apply>> queryList(@RequestParam(required = false) String applyName) {
         return Result.success(applyService.queryList(applyName));
     }
-    
+
      /**
      * 分页查询数据
      *

+ 1 - 0
src/main/java/com/benyun/controller/EventController.java

@@ -20,6 +20,7 @@ import java.util.List;
 @RestController
 @RequestMapping("event")
 @RequiredArgsConstructor(onConstructor_ = {@Autowired})
+@CrossOrigin
 public class EventController {
     /**
      * 服务对象

+ 3 - 10
src/main/java/com/benyun/controller/EventLogController.java

@@ -10,15 +10,7 @@ import lombok.RequiredArgsConstructor;
 import com.benyun.entity.EventLog;
 import com.benyun.service.EventLogService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.beetl.sql.core.engine.PageQuery;
 
 import javax.servlet.http.HttpServletRequest;
@@ -32,6 +24,7 @@ import java.util.Map;
 @RestController
 @RequestMapping("eventLog")
 @RequiredArgsConstructor(onConstructor_ = {@Autowired})
+@CrossOrigin
 public class EventLogController {
     /**
      * 服务对象
@@ -47,7 +40,7 @@ public class EventLogController {
     public Result<List<EventLog>> queryAll() {
         return Result.success(eventLogService.queryAll());
     }
-    
+
      /**
      * 分页查询数据
      *

+ 3 - 10
src/main/java/com/benyun/controller/UserController.java

@@ -6,15 +6,7 @@ import lombok.RequiredArgsConstructor;
 import com.benyun.entity.User;
 import com.benyun.service.UserService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 import org.beetl.sql.core.engine.PageQuery;
 
 import java.util.List;
@@ -26,6 +18,7 @@ import java.util.List;
 @RestController
 @RequestMapping("user")
 @RequiredArgsConstructor(onConstructor_ = {@Autowired})
+@CrossOrigin
 public class UserController {
     /**
      * 服务对象
@@ -41,7 +34,7 @@ public class UserController {
     public Result<List<User>> queryAll() {
         return Result.success(userService.queryAll());
     }
-    
+
      /**
      * 分页查询数据
      *

+ 1 - 1
src/main/resources/sql/EventLog.md

@@ -46,4 +46,4 @@ and a.apply_name like #applyName#
 @if(!isEmpty(eventName)){
 and e.event_name like #eventName#
 @}
-ORDER BY el.id
+ORDER BY el.id decs