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

com.seven.cow.servlet.upload.ServletUploadAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 0.2.4
Show newest version
package com.seven.cow.servlet.upload;

import com.seven.cow.servlet.upload.filters.FileUploadFilter;
import com.seven.cow.servlet.upload.properties.UploadProperties;
import com.seven.cow.servlet.upload.service.UploadFileService;
import com.seven.cow.servlet.upload.service.impl.DefaultUploadFileServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description: TODO
 * @author:EDY
 * @date: 2021/11/25 19:37
 * @version: 1.0
 */
@Configuration
@EnableConfigurationProperties(UploadProperties.class)
public class ServletUploadAutoConfiguration {

    @Bean("x-fileUploadFilter")
    public FileUploadFilter fileUploadFilter() {
        return new FileUploadFilter();
    }

    @Bean
    @ConditionalOnMissingBean
    public UploadFileService uploadFileService() {
        return new DefaultUploadFileServiceImpl();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy