Kaynağa Gözat

更新认证配置

woody 8 ay önce
ebeveyn
işleme
12b524057b

+ 3 - 1
src/main/java/com/chelvc/cloud/chelvc/Server.java

@@ -8,6 +8,7 @@ import com.chelvc.framework.base.config.BeanFullnameGenerator;
 import com.chelvc.framework.base.config.MultiserverMvcConfigurer;
 import com.chelvc.framework.base.config.MultiserverMvcConfigurer;
 import com.chelvc.framework.database.interceptor.DynamicDatasourceInterceptor;
 import com.chelvc.framework.database.interceptor.DynamicDatasourceInterceptor;
 import com.chelvc.framework.nacos.config.MultiserverNacosConfigurer;
 import com.chelvc.framework.nacos.config.MultiserverNacosConfigurer;
+import com.chelvc.framework.security.context.AuthorizeSessionFactory;
 import org.mybatis.spring.annotation.MapperScan;
 import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -33,7 +34,8 @@ import org.springframework.context.annotation.Import;
                 UserServer.class,
                 UserServer.class,
                 AdminServer.class,
                 AdminServer.class,
                 VehicleServer.class,
                 VehicleServer.class,
-                MaintainServer.class
+                MaintainServer.class,
+                AuthorizeSessionFactory.class
         })})
         })})
 @Import({MultiserverMvcConfigurer.class, MultiserverNacosConfigurer.class, DynamicDatasourceInterceptor.class})
 @Import({MultiserverMvcConfigurer.class, MultiserverNacosConfigurer.class, DynamicDatasourceInterceptor.class})
 public class Server {
 public class Server {

+ 1 - 0
src/main/resources/application-dev.yml

@@ -35,6 +35,7 @@ nacos:
     server-addr: 47.108.128.78:6848
     server-addr: 47.108.128.78:6848
 
 
 security:
 security:
+  ignores: /user/**,/vehicle/**
   authorize:
   authorize:
     scoped: true
     scoped: true
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023

+ 1 - 0
src/main/resources/application-pre.yml

@@ -35,6 +35,7 @@ nacos:
     server-addr: 127.0.0.1:6848
     server-addr: 127.0.0.1:6848
 
 
 security:
 security:
+  ignores: /user/**,/vehicle/**
   authorize:
   authorize:
     scoped: true
     scoped: true
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023

+ 1 - 0
src/main/resources/application-prod.yml

@@ -35,6 +35,7 @@ nacos:
     server-addr: 127.0.0.1:6848
     server-addr: 127.0.0.1:6848
 
 
 security:
 security:
+  ignores: /user/**,/vehicle/**
   authorize:
   authorize:
     scoped: true
     scoped: true
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023

+ 1 - 0
src/main/resources/application-test.yml

@@ -35,6 +35,7 @@ nacos:
     server-addr: 127.0.0.1:6848
     server-addr: 127.0.0.1:6848
 
 
 security:
 security:
+  ignores: /user/**,/vehicle/**
   authorize:
   authorize:
     scoped: true
     scoped: true
     secret: oauth.token.secret@chelvc!@#2023
     secret: oauth.token.secret@chelvc!@#2023