mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
jar 升级&代码优化
This commit is contained in:
@@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user