mirror of
https://github.com/hs-web/hsweb-framework.git
synced 2026-05-23 01:39:35 +08:00
refactor: 调整spring-boot自动配置. (#261)
This commit is contained in:
@@ -16,6 +16,7 @@ import org.hswebframework.web.authorization.token.UserTokenManager;
|
||||
import org.hswebframework.web.authorization.twofactor.TwoFactorValidatorManager;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.*;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
@@ -36,7 +37,7 @@ import java.util.List;
|
||||
* @author zhouhao
|
||||
* @since 3.0
|
||||
*/
|
||||
@Configuration
|
||||
@AutoConfiguration
|
||||
@EnableConfigurationProperties(EmbedAuthenticationProperties.class)
|
||||
public class AuthorizingHandlerAutoConfiguration {
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.hswebframework.web.authorization.basic.twofactor.TwoFactorHandlerInte
|
||||
import org.hswebframework.web.authorization.basic.web.*;
|
||||
import org.hswebframework.web.authorization.token.UserTokenManager;
|
||||
import org.hswebframework.web.authorization.twofactor.TwoFactorValidatorManager;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.*;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -17,7 +18,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
@Configuration
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(name = "org.springframework.web.servlet.config.annotation.WebMvcConfigurer")
|
||||
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
|
||||
public class WebMvcAuthorizingConfiguration {
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
# Auto Configure
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.hswebframework.web.authorization.basic.configuration.AuthorizingHandlerAutoConfiguration,\
|
||||
org.hswebframework.web.authorization.basic.configuration.AuthorizingHandlerAutoConfiguration
|
||||
org.hswebframework.web.authorization.basic.configuration.WebMvcAuthorizingConfiguration
|
||||
Reference in New Issue
Block a user