zjk
5 天以前 ae56813ff0d78aae56b0b5066476ae4867b92a1f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.ruoyi.system.api.config;
 
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;
import com.ruoyi.common.core.utils.poi.ExcelImageHandler;
import com.ruoyi.system.api.RemoteFileService;
import com.ruoyi.system.api.handler.RemoteExcelImageHandler;
 
/**
 * Excel图片导入处理器
 *
 * @author ruoyi
 */
@AutoConfiguration
@ConditionalOnBean(RemoteFileService.class)
public class RemoteFileAutoConfiguration
{
    @Bean
    public ExcelImageHandler excelImageHandler(RemoteFileService remoteFileService)
    {
        return new RemoteExcelImageHandler(remoteFileService);
    }
}