All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.macrocloud.kernel.security.config.RegistryConfiguration Maven / Gradle / Ivy

There is a newer version: 1.1.0-RELEASE
Show newest version
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