From 1b0d23b5f004550ce34dd0c2f05cb92d9c3815d1 Mon Sep 17 00:00:00 2001
From: zhaoxiaohao <279049017@qq.com>
Date: Wed, 09 Dec 2020 09:30:58 +0800
Subject: [PATCH] 加一个懒加载

---
 kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/config/AuthorizationServerConfig.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/config/AuthorizationServerConfig.java b/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/config/AuthorizationServerConfig.java
index 84121f2..c4c32b6 100644
--- a/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/config/AuthorizationServerConfig.java
+++ b/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/config/AuthorizationServerConfig.java
@@ -3,10 +3,10 @@
 import com.kidgrow.oauth2.handler.SingleTokenServices;
 import com.kidgrow.oauth2.service.impl.RedisClientDetailsService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.context.annotation.Primary;
 import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.authentication.AuthenticationProvider;
@@ -134,6 +134,7 @@
 
     @Bean
     @Primary
+    @Lazy
     public SingleTokenServices KidgrowTokenServices(){
         SingleTokenServices tokenServices = new SingleTokenServices();
         tokenServices.setTokenStore(tokenStore);

--
Gitblit v1.8.0