package cn.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import cn.service.impl.EasyExcelServiceImpl;
import cn.util.core.IsKit;
import cn.util.core.TypeKit;

/**文件操作之配置文件*/

@Configuration
public class FileConfig
{
	@Value(value="${sam.file.excelHeadRowNum}")
    private String excelHeadRowNum;
    
    @Bean
    public void initConfig(){
    	if(IsKit.isNullOrEmpty(excelHeadRowNum)) {
        	EasyExcelServiceImpl.setParamExcelHeadRowNum(1);//默认为1
        }
        else {
        	EasyExcelServiceImpl.setParamExcelHeadRowNum(TypeKit.objToInt(excelHeadRowNum));
        }
    }
   
}
