From a7bf8fa62aaaa5a45bb89b65aa2f861b347185d8 Mon Sep 17 00:00:00 2001 From: MaxKey Date: Mon, 4 Mar 2024 17:10:45 +0800 Subject: [PATCH] =?UTF-8?q?jar=20=E5=8D=87=E7=BA=A7&=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../SessionAutoConfiguration.java | 15 ++++--------- .../autoconfigure/TokenAutoConfiguration.java | 22 ++++++------------- .../IpLocationAutoConfiguration.java | 7 +----- .../OneTimePasswordAutoConfiguration.java | 7 +----- .../AuthnProviderAutoConfiguration.java | 10 ++------- .../JwtAuthnAutoConfiguration.java | 9 +------- .../autoconfigure/SmsAutoConfiguration.java | 10 ++------- .../SocialSignOnAutoConfiguration.java | 9 +------- .../ApplicationAutoConfiguration.java | 8 +------ .../autoconfigure/MvcAutoConfiguration.java | 9 +------- .../autoconfigure/RedisAutoConfiguration.java | 7 +----- .../maxkey/autoconfigure/MaxKeyConfig.java | 12 +--------- .../maxkey/autoconfigure/MaxKeyMgtConfig.java | 8 +------ .../MaxKeyMgtListenerConfig.java | 9 +------- .../Oauth20ClientAutoConfiguration.java | 8 +------ .../autoconfigure/MaxKeyOpenApiConfig.java | 9 +------- .../Oauth20ClientAutoConfiguration.java | 8 +------ 18 files changed, 29 insertions(+), 140 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7e0c954ab..106b54cc6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -79,7 +79,7 @@ poiVersion =5.2.3 #tomcat tomcatVersion =10.1.18 #logs -log4jVersion =2.22.1 +log4jVersion =2.23.0 slf4jVersion =2.0.11 jbossloggingVersion =3.5.0.Final #Messaging Kafka & RocketMQ diff --git a/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/SessionAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/SessionAutoConfiguration.java index 02cc91ecb..b2b49506e 100644 --- a/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/SessionAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/SessionAutoConfiguration.java @@ -24,7 +24,6 @@ import org.dromara.maxkey.authn.web.SavedRequestAwareAuthenticationSuccessHandle import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -32,7 +31,7 @@ import org.springframework.jdbc.core.JdbcTemplate; @AutoConfiguration -public class SessionAutoConfiguration implements InitializingBean { +public class SessionAutoConfiguration { private static final Logger _logger = LoggerFactory.getLogger(SessionAutoConfiguration.class); @@ -50,11 +49,9 @@ public class SessionAutoConfiguration implements InitializingBean { RedisConnectionFactory redisConnFactory, @Value("${maxkey.session.timeout:1800}") int timeout ) { - _logger.debug("session timeout " + timeout); - SessionManager sessionManager = - new SessionManagerFactory( - persistence, jdbcTemplate, redisConnFactory,timeout); - return sessionManager; + _logger.debug("session timeout {}" , timeout); + return new SessionManagerFactory( + persistence, jdbcTemplate, redisConnFactory,timeout); } @Bean @@ -62,8 +59,4 @@ public class SessionAutoConfiguration implements InitializingBean { return new HttpSessionListenerAdapter(); } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/TokenAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/TokenAutoConfiguration.java index f4bd2a2cd..2ab963a86 100644 --- a/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/TokenAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-core/src/main/java/org/dromara/maxkey/autoconfigure/TokenAutoConfiguration.java @@ -28,7 +28,6 @@ import org.dromara.maxkey.persistence.cache.MomentaryService; import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -36,7 +35,7 @@ import com.nimbusds.jose.JOSEException; @AutoConfiguration -public class TokenAutoConfiguration implements InitializingBean { +public class TokenAutoConfiguration{ private static final Logger _logger = LoggerFactory.getLogger(TokenAutoConfiguration.class); @@ -55,15 +54,12 @@ public class TokenAutoConfiguration implements InitializingBean { congressService = new InMemoryCongressService(); } - AuthTokenService authTokenService = - new AuthTokenService( - authJwkConfig, - congressService, - momentaryService, - refreshTokenService - ); - - return authTokenService; + return new AuthTokenService( + authJwkConfig, + congressService, + momentaryService, + refreshTokenService + ); } @Bean @@ -71,8 +67,4 @@ public class TokenAutoConfiguration implements InitializingBean { return new AuthRefreshTokenService(authJwkConfig); } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-ip2location/src/main/java/org/dromara/maxkey/autoconfigure/IpLocationAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-ip2location/src/main/java/org/dromara/maxkey/autoconfigure/IpLocationAutoConfiguration.java index de5272ebe..43c4d4538 100644 --- a/maxkey-authentications/maxkey-authentication-ip2location/src/main/java/org/dromara/maxkey/autoconfigure/IpLocationAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-ip2location/src/main/java/org/dromara/maxkey/autoconfigure/IpLocationAutoConfiguration.java @@ -25,7 +25,6 @@ import org.dromara.maxkey.ip2location.online.Ip138; import org.lionsoul.ip2region.xdb.Searcher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -41,7 +40,7 @@ import com.maxmind.geoip2.DatabaseReader; */ @AutoConfiguration -public class IpLocationAutoConfiguration implements InitializingBean { +public class IpLocationAutoConfiguration { static final Logger _logger = LoggerFactory.getLogger(IpLocationAutoConfiguration.class); /** @@ -133,9 +132,5 @@ public class IpLocationAutoConfiguration implements InitializingBean { ); } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-otp/src/main/java/org/dromara/maxkey/autoconfigure/OneTimePasswordAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-otp/src/main/java/org/dromara/maxkey/autoconfigure/OneTimePasswordAutoConfiguration.java index 9f9843fb9..5a5284cd5 100644 --- a/maxkey-authentications/maxkey-authentication-otp/src/main/java/org/dromara/maxkey/autoconfigure/OneTimePasswordAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-otp/src/main/java/org/dromara/maxkey/autoconfigure/OneTimePasswordAutoConfiguration.java @@ -24,14 +24,13 @@ import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.dromara.maxkey.persistence.service.EmailSendersService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @AutoConfiguration -public class OneTimePasswordAutoConfiguration implements InitializingBean { +public class OneTimePasswordAutoConfiguration { private static final Logger _logger = LoggerFactory.getLogger(OneTimePasswordAutoConfiguration.class); @@ -54,8 +53,4 @@ public class OneTimePasswordAutoConfiguration implements InitializingBean { return otpAuthnService; } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/AuthnProviderAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/AuthnProviderAutoConfiguration.java index 4aa515d2a..9fb25b1ce 100644 --- a/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/AuthnProviderAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/AuthnProviderAutoConfiguration.java @@ -34,7 +34,6 @@ import org.dromara.maxkey.persistence.repository.LoginRepository; import org.dromara.maxkey.persistence.repository.PasswordPolicyValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.MessageSource; @@ -43,9 +42,8 @@ import org.springframework.jdbc.core.JdbcTemplate; @AutoConfiguration -public class AuthnProviderAutoConfiguration implements InitializingBean { - private static final Logger _logger = - LoggerFactory.getLogger(AuthnProviderAutoConfiguration.class); +public class AuthnProviderAutoConfiguration { + static final Logger _logger = LoggerFactory.getLogger(AuthnProviderAutoConfiguration.class); @Bean public AbstractAuthenticationProvider authenticationProvider( @@ -138,8 +136,4 @@ public class AuthnProviderAutoConfiguration implements InitializingBean { jdbcTemplate,applicationConfig,authTokenService,validity); } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/JwtAuthnAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/JwtAuthnAutoConfiguration.java index cfc035427..d9ed2bac6 100644 --- a/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/JwtAuthnAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-provider/src/main/java/org/dromara/maxkey/autoconfigure/JwtAuthnAutoConfiguration.java @@ -26,7 +26,6 @@ import org.dromara.maxkey.crypto.jose.keystore.JWKSetKeyStore; import org.dromara.maxkey.crypto.jwt.signer.service.impl.DefaultJwtSigningAndValidationService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -34,7 +33,7 @@ import org.springframework.core.io.ClassPathResource; @AutoConfiguration -public class JwtAuthnAutoConfiguration implements InitializingBean { +public class JwtAuthnAutoConfiguration { private static final Logger _logger = LoggerFactory.getLogger(JwtAuthnAutoConfiguration.class); /** @@ -85,10 +84,4 @@ public class JwtAuthnAutoConfiguration implements InitializingBean { _logger.debug("JWT Login Service init."); return jwtLoginService; } - - - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-sms/src/main/java/org/dromara/maxkey/autoconfigure/SmsAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-sms/src/main/java/org/dromara/maxkey/autoconfigure/SmsAutoConfiguration.java index f7a5fd2eb..67a65689e 100644 --- a/maxkey-authentications/maxkey-authentication-sms/src/main/java/org/dromara/maxkey/autoconfigure/SmsAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-sms/src/main/java/org/dromara/maxkey/autoconfigure/SmsAutoConfiguration.java @@ -25,16 +25,14 @@ import org.dromara.maxkey.persistence.service.EmailSendersService; import org.dromara.maxkey.persistence.service.SmsProviderService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @AutoConfiguration -public class SmsAutoConfiguration implements InitializingBean { - private static final Logger _logger = - LoggerFactory.getLogger(SmsAutoConfiguration.class); +public class SmsAutoConfiguration { + private static final Logger _logger = LoggerFactory.getLogger(SmsAutoConfiguration.class); @Bean(name = "smsOtpAuthnService") @@ -56,8 +54,4 @@ public class SmsAutoConfiguration implements InitializingBean { return smsOtpAuthnService; } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java b/maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java index bc0544335..f8b490301 100644 --- a/maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java +++ b/maxkey-authentications/maxkey-authentication-social/src/main/java/org/dromara/maxkey/autoconfigure/SocialSignOnAutoConfiguration.java @@ -22,12 +22,10 @@ import java.io.IOException; import org.dromara.maxkey.authn.support.socialsignon.service.JdbcSocialsAssociateService; import org.dromara.maxkey.authn.support.socialsignon.service.SocialSignOnProviderService; import org.dromara.maxkey.authn.support.socialsignon.token.RedisTokenStore; -import org.dromara.maxkey.constants.ConstsPersistence; import org.dromara.maxkey.entity.SocialsProvider; import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; @@ -39,7 +37,7 @@ import org.springframework.jdbc.core.JdbcTemplate; @ComponentScan(basePackages = { "org.maxkey.authn.support.socialsignon" }) -public class SocialSignOnAutoConfiguration implements InitializingBean { +public class SocialSignOnAutoConfiguration{ private static final Logger _logger = LoggerFactory.getLogger(SocialSignOnAutoConfiguration.class); @Bean(name = "socialSignOnProviderService") @@ -68,9 +66,4 @@ public class SocialSignOnAutoConfiguration implements InitializingBean { return socialsAssociateService; } - - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/ApplicationAutoConfiguration.java b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/ApplicationAutoConfiguration.java index 410a98df9..14688995d 100644 --- a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/ApplicationAutoConfiguration.java +++ b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/ApplicationAutoConfiguration.java @@ -41,7 +41,6 @@ import org.dromara.maxkey.util.SnowFlakeId; import org.dromara.maxkey.web.WebContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -56,7 +55,7 @@ import org.springframework.security.crypto.password.Pbkdf2PasswordEncoder; import org.springframework.security.crypto.scrypt.SCryptPasswordEncoder; @AutoConfiguration -public class ApplicationAutoConfiguration implements InitializingBean { +public class ApplicationAutoConfiguration { static final Logger _logger = LoggerFactory.getLogger(ApplicationAutoConfiguration.class); @Bean @@ -192,9 +191,4 @@ public class ApplicationAutoConfiguration implements InitializingBean { return momentaryService; } - - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/MvcAutoConfiguration.java b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/MvcAutoConfiguration.java index 400b572bf..c2f9c0f58 100644 --- a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/MvcAutoConfiguration.java +++ b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/MvcAutoConfiguration.java @@ -29,7 +29,6 @@ import org.dromara.maxkey.web.WebInstRequestFilter; import org.dromara.maxkey.web.WebXssRequestFilter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.actuate.endpoint.ApiVersion; import org.springframework.boot.autoconfigure.AutoConfiguration; @@ -63,7 +62,7 @@ import jakarta.servlet.Filter; @AutoConfiguration -public class MvcAutoConfiguration implements InitializingBean , WebMvcConfigurer { +public class MvcAutoConfiguration implements WebMvcConfigurer { static final Logger _logger = LoggerFactory.getLogger(MvcAutoConfiguration.class); /** @@ -289,11 +288,5 @@ public class MvcAutoConfiguration implements InitializingBean , WebMvcConfigurer registrationBean.setOrder(4); return registrationBean; } - - @Override - public void afterPropertiesSet() throws Exception { - } - - } diff --git a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/RedisAutoConfiguration.java b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/RedisAutoConfiguration.java index 299d547fc..745092766 100644 --- a/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/RedisAutoConfiguration.java +++ b/maxkey-core/src/main/java/org/dromara/maxkey/autoconfigure/RedisAutoConfiguration.java @@ -20,14 +20,13 @@ package org.dromara.maxkey.autoconfigure; import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import redis.clients.jedis.JedisPoolConfig; @AutoConfiguration -public class RedisAutoConfiguration implements InitializingBean { +public class RedisAutoConfiguration { static final Logger _logger = LoggerFactory.getLogger(RedisAutoConfiguration.class); /** @@ -78,8 +77,4 @@ public class RedisAutoConfiguration implements InitializingBean { return factory; } - @Override - public void afterPropertiesSet() throws Exception { - - } } diff --git a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyConfig.java b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyConfig.java index 692581d07..ba2859076 100644 --- a/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyConfig.java +++ b/maxkey-webs/maxkey-web-maxkey/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyConfig.java @@ -45,7 +45,6 @@ import org.dromara.maxkey.persistence.service.LdapContextService; import org.dromara.maxkey.persistence.service.UserInfoService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -74,7 +73,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; "org.maxkey.authz.ltpa.endpoint", "org.maxkey.authz.token.endpoint" }) -public class MaxKeyConfig implements InitializingBean { +public class MaxKeyConfig { private static final Logger logger = LoggerFactory.getLogger(MaxKeyConfig.class); @@ -213,13 +212,4 @@ public class MaxKeyConfig implements InitializingBean { return kerberosService; } - - - @Override - public void afterPropertiesSet() throws Exception { - - } - - - } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtConfig.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtConfig.java index 77677ed23..8990b4814 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtConfig.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtConfig.java @@ -27,14 +27,13 @@ import org.dromara.maxkey.persistence.repository.PasswordPolicyValidator; import org.dromara.maxkey.persistence.service.UserInfoService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.security.crypto.password.PasswordEncoder; @AutoConfiguration -public class MaxKeyMgtConfig implements InitializingBean { +public class MaxKeyMgtConfig { private static final Logger logger = LoggerFactory.getLogger(MaxKeyMgtConfig.class); //authenticationRealm for MaxKeyMgtApplication @@ -68,9 +67,4 @@ public class MaxKeyMgtConfig implements InitializingBean { return tfaOtpAuthn; } - @Override - public void afterPropertiesSet() throws Exception { - - } - } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtListenerConfig.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtListenerConfig.java index cbd466602..462f064aa 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtListenerConfig.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyMgtListenerConfig.java @@ -31,14 +31,13 @@ import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.core.JdbcTemplate; @AutoConfiguration -public class MaxKeyMgtListenerConfig implements InitializingBean { +public class MaxKeyMgtListenerConfig { private static final Logger logger = LoggerFactory.getLogger(MaxKeyMgtListenerConfig.class); @Bean @@ -90,10 +89,4 @@ public class MaxKeyMgtListenerConfig implements InitializingBean { } return "provisioningRunnerThread"; } - - @Override - public void afterPropertiesSet() throws Exception { - - } - } diff --git a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java index 1915db1c9..1e069804b 100644 --- a/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java +++ b/maxkey-webs/maxkey-web-mgt/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java @@ -28,7 +28,6 @@ import org.dromara.maxkey.authz.oauth2.provider.token.store.RedisTokenStore; import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -43,7 +42,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; * */ @AutoConfiguration -public class Oauth20ClientAutoConfiguration implements InitializingBean { +public class Oauth20ClientAutoConfiguration { private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class); @Bean @@ -113,9 +112,4 @@ public class Oauth20ClientAutoConfiguration implements InitializingBean { return authenticationManager; } - @Override - public void afterPropertiesSet() throws Exception { - - } - } diff --git a/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyOpenApiConfig.java b/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyOpenApiConfig.java index ac14921b4..6b937b648 100644 --- a/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyOpenApiConfig.java +++ b/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/MaxKeyOpenApiConfig.java @@ -27,14 +27,13 @@ import org.dromara.maxkey.persistence.repository.PasswordPolicyValidator; import org.dromara.maxkey.persistence.service.UserInfoService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.security.crypto.password.PasswordEncoder; @AutoConfiguration -public class MaxKeyOpenApiConfig implements InitializingBean { +public class MaxKeyOpenApiConfig{ private static final Logger logger = LoggerFactory.getLogger(MaxKeyOpenApiConfig.class); //authenticationRealm for MaxKeyMgtApplication @@ -67,10 +66,4 @@ public class MaxKeyOpenApiConfig implements InitializingBean { logger.debug("TimeBasedOtpAuthn inited."); return tfaOtpAuthn; } - - @Override - public void afterPropertiesSet() throws Exception { - - } - } diff --git a/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java b/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java index 658454c7d..d843fa147 100644 --- a/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java +++ b/maxkey-webs/maxkey-web-openapi/src/main/java/org/dromara/maxkey/autoconfigure/Oauth20ClientAutoConfiguration.java @@ -28,7 +28,6 @@ import org.dromara.maxkey.authz.oauth2.provider.token.store.RedisTokenStore; import org.dromara.maxkey.persistence.redis.RedisConnectionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; @@ -43,7 +42,7 @@ import org.springframework.security.crypto.password.PasswordEncoder; * */ @AutoConfiguration -public class Oauth20ClientAutoConfiguration implements InitializingBean { +public class Oauth20ClientAutoConfiguration { private static final Logger logger = LoggerFactory.getLogger(Oauth20ClientAutoConfiguration.class); @Bean @@ -112,10 +111,5 @@ public class Oauth20ClientAutoConfiguration implements InitializingBean { logger.debug("OAuth 2 Client Authentication Manager init."); return authenticationManager; } - - @Override - public void afterPropertiesSet() throws Exception { - - } }