org.macrocloud.kernel.security.config.RegistryConfiguration Maven / Gradle / Ivy
package org.macrocloud.kernel.security.config;
import lombok.AllArgsConstructor;
import org.macrocloud.kernel.security.handler.ISecureHandler;
import org.macrocloud.kernel.security.handler.SecureHandlerHandler;
import org.macrocloud.kernel.security.registry.SecureRegistry;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
/**
* secure注册默认配置
*/
@Order
@Configuration
@AllArgsConstructor
@AutoConfigureBefore(SecureConfiguration.class)
public class RegistryConfiguration {
@Bean
@ConditionalOnMissingBean(SecureRegistry.class)
public SecureRegistry secureRegistry() {
return new SecureRegistry();
}
@Bean
@ConditionalOnMissingBean(ISecureHandler.class)
public ISecureHandler secureHandler() {
return new SecureHandlerHandler();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy