细节优化、文档优化
This commit is contained in:
+3
-3
@@ -16,7 +16,7 @@
|
||||
package cn.dev33.satoken.solon.oauth2;
|
||||
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2ServerConfig;
|
||||
import cn.dev33.satoken.oauth2.template.SaOAuth2Template;
|
||||
import cn.dev33.satoken.oauth2.template.SaOAuth2Util;
|
||||
import org.noear.solon.annotation.Bean;
|
||||
@@ -39,7 +39,7 @@ public class SaOAuth2AutoConfigure {
|
||||
SaOAuth2Util.saOAuth2Template = bean;
|
||||
});
|
||||
|
||||
appContext.subBeansOfType(SaOAuth2Config.class, bean -> {
|
||||
appContext.subBeansOfType(SaOAuth2ServerConfig.class, bean -> {
|
||||
SaOAuth2Manager.setConfig(bean);
|
||||
});
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public class SaOAuth2AutoConfigure {
|
||||
* 获取 OAuth2配置Bean
|
||||
*/
|
||||
@Bean
|
||||
public SaOAuth2Config getConfig(@Inject(value = "${sa-token.oauth2}", required = false) SaOAuth2Config oAuth2Config) {
|
||||
public SaOAuth2ServerConfig getConfig(@Inject(value = "${sa-token.oauth2}", required = false) SaOAuth2ServerConfig oAuth2Config) {
|
||||
return oAuth2Config;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
package cn.dev33.satoken.spring.oauth2;
|
||||
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2ServerConfig;
|
||||
import cn.dev33.satoken.oauth2.dao.SaOAuth2Dao;
|
||||
import cn.dev33.satoken.oauth2.data.convert.SaOAuth2DataConverter;
|
||||
import cn.dev33.satoken.oauth2.data.generate.SaOAuth2DataGenerate;
|
||||
@@ -52,7 +52,7 @@ public class SaOAuth2BeanInject {
|
||||
* @param saOAuth2Config 配置对象
|
||||
*/
|
||||
@Autowired(required = false)
|
||||
public void setSaOAuth2Config(SaOAuth2Config saOAuth2Config) {
|
||||
public void setSaOAuth2Config(SaOAuth2ServerConfig saOAuth2Config) {
|
||||
SaOAuth2Manager.setConfig(saOAuth2Config);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
package cn.dev33.satoken.spring.oauth2;
|
||||
|
||||
import cn.dev33.satoken.oauth2.SaOAuth2Manager;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2Config;
|
||||
import cn.dev33.satoken.oauth2.config.SaOAuth2ServerConfig;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -36,9 +36,9 @@ public class SaOAuth2BeanRegister {
|
||||
* @return 配置对象
|
||||
*/
|
||||
@Bean
|
||||
@ConfigurationProperties(prefix = "sa-token.oauth2")
|
||||
public SaOAuth2Config getSaOAuth2Config() {
|
||||
return new SaOAuth2Config();
|
||||
@ConfigurationProperties(prefix = "sa-token.oauth2-server")
|
||||
public SaOAuth2ServerConfig getSaOAuth2Config() {
|
||||
return new SaOAuth2ServerConfig();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user