org.zodiac.autoconfigure.boot.PlatformUploadFileAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.boot;
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.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.zodiac.autoconfigure.boot.condition.ConditionalOnMultipartUploadEnabled;
@Order(value = Ordered.HIGHEST_PRECEDENCE)
@SpringBootConfiguration
@ConditionalOnWebApplication
@ConditionalOnMultipartUploadEnabled
@ConditionalOnClass(value = {org.zodiac.boot.config.PlatformUploadFileInfo.class})
public class PlatformUploadFileAutoConfiguration {
public PlatformUploadFileAutoConfiguration() {
}
@Bean
@ConditionalOnMissingBean
@ConfigurationProperties(prefix = org.zodiac.boot.constants.PlatformBootSystemPropertiesConstants.SPRING_MULTIPART_FILE_PREFIX, ignoreInvalidFields = true)
protected PlatformUploadFileProperties platformUploadFileProperties() {
return new PlatformUploadFileProperties();
}
}