org.zodiac.autoconfigure.boot.PlatformRequestAutoConfiguration Maven / Gradle / Ivy
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();
}
}