refactor: Removed debug logs.
This commit is contained in:
-1
@@ -101,7 +101,6 @@ public class AuthzeroTokenResolverAutoConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
public TokenResolver<DecodedJWT> tokenResolver() {
|
||||
log.debug("Creating bean TokenResolver<DecodedJWT>.");
|
||||
return new AuthzeroTokenResolver(
|
||||
jtiCreator,
|
||||
simpleJwtProperties.algorithm(),
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ public class GuidAutoConfiguration {
|
||||
@Bean
|
||||
@Conditional(GuidCreatorCondition.class)
|
||||
public GuidCreator<?> jtiCreator() {
|
||||
log.debug("[GuidAutoConfiguration] --- Initializing default jtiCreator.");
|
||||
return UUID::randomUUID;
|
||||
}
|
||||
|
||||
|
||||
+1
-6
@@ -19,16 +19,11 @@ import java.util.Objects;
|
||||
public class GuidCreatorCondition implements Condition {
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
log.debug("[GuidCreatorCondition] --- Detecting bean jtiCreator.");
|
||||
final var beanFactory = Objects.requireNonNull(context.getBeanFactory());
|
||||
var isContainJtiCreator = beanFactory.containsBean("jtiCreator");
|
||||
log.debug("[GuidCreatorCondition] --- Bean jtiCreator {} been created.", isContainJtiCreator ? "has" : "has not");
|
||||
if (isContainJtiCreator) {
|
||||
var result = !(beanFactory.getBean("jtiCreator") instanceof GuidCreator<?>);
|
||||
log.debug("[GuidCreatorCondition] --- Create jtiCreator now? {}.", result ? "yes" : "no");
|
||||
return result;
|
||||
return !(beanFactory.getBean("jtiCreator") instanceof GuidCreator<?>);
|
||||
}
|
||||
log.debug("[GuidCreatorCondition] --- Condition passed.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user