TRX 1 éve
szülő
commit
1732a2cbdf

+ 4 - 0
src/main/java/com/zswl/dataservice/auth/UserContextInterceptor.java

@@ -94,6 +94,10 @@ public class UserContextInterceptor implements HandlerInterceptor {
                 response.setStatus(HttpStatus.UNAUTHORIZED.value());
                 JSONObject data = new JSONObject();
                 data.put("message", "用户没有登录,请登录");
+                JSONObject exception = new JSONObject();
+                exception.put("type", "AuthenticationCredentialsNotFoundException");
+                data.put("state", "Fail");
+                data.put("exception", exception);
                 response.getWriter().write(data.toJSONString());
                 response.getWriter().flush();
                 response.getWriter().close();

+ 1 - 0
src/main/java/com/zswl/dataservice/model/user/UserCountParam.java

@@ -39,6 +39,7 @@ public class UserCountParam extends SuperParam {
     @Schema(description = "密码")
     private String confirmPass;
 
+    @Schema(description = "用户状态")
     private UserState userState = UserState.Enable;
 
     @Schema(description = "关联项目ID集合")

+ 7 - 4
src/main/resources/application-dev.yml

@@ -21,12 +21,15 @@ spring:
 
   data:
     mongodb:
-#      uri: mongodb://admin:admin123@192.168.0.104:37047,192.168.0.104:47037,192.168.0.104:37027/iotCenter?replicaSet=rs
-      uri: mongodb://root:8756mongo2024@172.24.50.53:27017,172.24.50.53:27018,172.24.50.53:27019/iotCenter?authSource=admin
+      uri: mongodb://admin:admin123@192.168.0.104:37047,192.168.0.104:47037,192.168.0.104:37027/iotCenter?replicaSet=rs
+#      uri: mongodb://root:8756mongo2024@172.24.50.53:27017,172.24.50.53:27018,172.24.50.53:27019/iotCenter?authSource=admin
       auto-index-creation: true
     redis:
-      host: 172.24.50.53
-      port: 6379
+#      host: 172.24.50.53
+#      port: 6379
+#      password: 8756redis2024
+      host: 127.0.0.1
+      port: 6378
       password: 8756redis2024
       database: 7
       timeout: 5000