org.zodiac.autoconfigure.security.SecurityJwtAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.security;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.security.condition.ConditionalOnSecurityJwtEnabled;
import org.zodiac.autoconfigure.security.jwt.SecurityJwtProperties;
@SpringBootConfiguration
@ConditionalOnSecurityJwtEnabled
@ConditionalOnClass(value = {org.zodiac.security.jwt.config.SecurityJwtInfo.class})
public class SecurityJwtAutoConfiguration {
public SecurityJwtAutoConfiguration() {
}
@Bean
@ConditionalOnMissingBean
@ConditionalOnClass(value = {org.zodiac.security.util.SecurityJwtUtil.class})
@ConfigurationProperties(prefix = SecurityJwtProperties.PREFIX, ignoreInvalidFields = true)
protected SecurityJwtProperties securityJwtProperties() {
return new SecurityJwtProperties();
}
}