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

org.zodiac.autoconfigure.boot.PlatformRequestAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.boot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.boot.condition.ConditionalOnPatformRequestEnabled;

/**
 * 过滤器配置类。
 *
 */
@SpringBootConfiguration
@ConditionalOnWebApplication
@ConditionalOnPatformRequestEnabled
//@SpringBootConfiguration
//@EnableConfigurationProperties(value = {PlatformRequestProperties.class})
@ConditionalOnClass(value = {org.zodiac.boot.ctrl.PlatformRemoteService.class})
public class PlatformRequestAutoConfiguration {

    protected final Logger log = LoggerFactory.getLogger(getClass());

    public PlatformRequestAutoConfiguration() {
        log.info("{} loaded.", getClass().getCanonicalName());
    }

    @Bean
    @ConditionalOnMissingBean
    @ConfigurationProperties(prefix = org.zodiac.boot.constants.PlatformBootSystemPropertiesConstants.SPRING_HTTP_REQUEST_PREFIX, ignoreInvalidFields = true)
    protected PlatformRequestProperties platformRequestProperties() {
        return new PlatformRequestProperties();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy