Conditional for autoconfig
This commit is contained in:
parent
302907012f
commit
1683f9521c
@ -1,6 +1,7 @@
|
||||
package com.knecon.fforesight.keycloakcommons;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@ -8,6 +9,7 @@ import com.knecon.fforesight.keycloakcommons.security.properties.CommonsKeyCloak
|
||||
|
||||
@ComponentScan
|
||||
@AutoConfiguration
|
||||
@ConditionalOnProperty(prefix = "fforesight.keycloak", value = "enabled", havingValue = "true")
|
||||
@EnableConfigurationProperties(CommonsKeyCloakProperties.class)
|
||||
public class DefaultKeyCloakCommonsAutoConfiguration {
|
||||
|
||||
|
||||
@ -12,5 +12,6 @@ import lombok.Data;
|
||||
public class CommonsKeyCloakProperties {
|
||||
|
||||
private List<String> ignoredEndpoints = new ArrayList<>();
|
||||
private boolean enabled;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user