martin 3 년 전
부모
커밋
32846a997a

+ 6 - 2
simulation-oauth-server/src/main/java/com/css/simulation/oauth/server/cofiguration/oauth/OauthAuthorizationServerConfiguration.java

@@ -50,10 +50,14 @@ public class OauthAuthorizationServerConfiguration extends AuthorizationServerCo
         clients.inMemory()  // 内存方式
                 .withClient("simulation-oauth-client")       // 客户端 id
                 .secret("hPT7zVteEXvRzS41NhJXoQYqtGmai3W0")   // 客户端密钥
-                .resourceIds("simulation-resource-scheduler")  // 客户端拥有的资源列表
+                .resourceIds(
+                        "simulation-resource-common",
+                        "simulation-resource-scheduler",
+                        "simulation-resource-sever"
+                )  // 客户端拥有的资源列表
                 .authorizedGrantTypes("password", "refresh_token") // 允许的授权方式
                 .scopes("all")    // 授权范围划分
-                .autoApprove(false); // 是否自动通过,即是否跳过 scope 选择界面,跳过的话代表将所有 scope 授权范围赋予该 client
+                .autoApprove(true); // 是否自动通过,即是否跳过 scope 选择界面,跳过的话代表将所有 scope 授权范围赋予该 client
     }
 
     /**

+ 6 - 1
simulation-resource-common/pom.xml

@@ -30,11 +30,16 @@
         </dependency>
         <!-- apache kafka - 结束 -->
 
-        <!-- redis -->
+        <!-- 缓存 - 开始-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+        <!-- 缓存 - 结束-->
         <!-- minio - 开始 -->
         <dependency>
             <groupId>com.squareup.okhttp3</groupId>

+ 1 - 1
simulation-resource-common/src/main/resources/bootstrap.yml

@@ -1,6 +1,6 @@
 spring:
   application:
-    name: simulation-resource-scheduler
+    name: simulation-resource-common
   profiles:
     active: dev
   cloud: