周浩 %!s(int64=9) %!d(string=hai) anos
pai
achega
b0dba8cf83

+ 7 - 7
hsweb-web-controller/src/main/java/org/hsweb/web/controller/GenericController.java

@@ -59,7 +59,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(method = RequestMethod.GET)
     @AccessLogger("查询列表")
-    @Authorize(level = "R")
+    @Authorize(action = "R")
     public ResponseMessage list(QueryParam param) {
         // 获取条件查询
         try {
@@ -82,7 +82,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(value = "/{id}", method = RequestMethod.GET)
     @AccessLogger("查询明细")
-    @Authorize(level = "R")
+    @Authorize(action = "R")
     public ResponseMessage info(@PathVariable("id") PK id) {
         try {
             PO po = getService().selectByPk(id);
@@ -103,7 +103,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(value = "/total", method = RequestMethod.GET)
     @AccessLogger("查询总数")
-    @Authorize(level = "R")
+    @Authorize(action = "R")
     public ResponseMessage total(QueryParam param) {
         try {
             // 获取条件查询
@@ -121,7 +121,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(method = RequestMethod.POST)
     @AccessLogger("新增")
-    @Authorize(level = "C")
+    @Authorize(action = "C")
     public ResponseMessage add(@RequestBody PO object) {
         try {
             PK pk = getService().insert(object);
@@ -139,7 +139,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
     @AccessLogger("删除")
-    @Authorize(level = "D")
+    @Authorize(action = "D")
     public ResponseMessage delete(@PathVariable("id") PK id) {
         try {
             int number = getService().delete(id);
@@ -157,7 +157,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
     @AccessLogger("修改")
-    @Authorize(level = "U")
+    @Authorize(action = "U")
     public ResponseMessage update(@PathVariable("id") PK id, @RequestBody(required = true) PO object) {
         try {
             if (object instanceof GenericPo) {
@@ -178,7 +178,7 @@ public abstract class GenericController<PO, PK> {
      */
     @RequestMapping(method = RequestMethod.PUT)
     @AccessLogger("批量修改")
-    @Authorize(level = "U")
+    @Authorize(action = "U")
     public ResponseMessage update(@RequestBody(required = true) String json) {
         try {
             int number;

+ 2 - 2
hsweb-web-controller/src/main/java/org/hsweb/web/controller/config/ConfigController.java

@@ -142,13 +142,13 @@ public class ConfigController extends GenericController<Config, String> {
     }
 
     @Override
-    @Authorize(module = "config", level = "C")
+    @Authorize(module = "config", action = "C")
     public ResponseMessage add(@RequestBody Config object) {
         return super.add(object);
     }
 
     @Override
-    @Authorize(module = "config", level = "U")
+    @Authorize(module = "config", action = "U")
     public ResponseMessage update(@PathVariable("id") String id, @RequestBody Config object) {
         return super.update(id, object);
     }

+ 1 - 1
hsweb-web-core/src/main/java/org/hsweb/web/authorize/annotation/Authorize.java

@@ -31,7 +31,7 @@ public @interface Authorize {
      *
      * @return
      */
-    String[] level() default {};
+    String[] action() default {};
 
     /**
      * 表达式验证如

+ 0 - 10
pom.xml

@@ -109,10 +109,6 @@
             </exclusions>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>springloaded</artifactId>
-        </dependency>
         <!--json-->
         <dependency>
             <groupId>com.alibaba</groupId>
@@ -145,12 +141,6 @@
             <artifactId>spring-boot-starter-aop</artifactId>
         </dependency>
 
-        <!--开发工具-->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-devtools</artifactId>
-        </dependency>
-
     </dependencies>
 
     <dependencyManagement>