package cn.hmsoft.scan.common; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; import org.springframework.stereotype.Component; /** * 系统配置常量类. * */ @Configuration @PropertySource( value={ "classpath:config.properties" }, ignoreResourceNotFound=true ) @Component public class AppConfig { /** * 考生登记表扫描目录 */ @Value("${file.scan.dir}") private String fileScanDir; /** * 临时文件路径. */ @Value("${download.temp}") private String downloadTemp; /** * ocr识别成功后,移植的目录 */ @Value("${file.ocr.result.dir}") private String resultDir; /** * 消费者线程的数目,需要根据百度的QPS大小来配置 */ @Value("${scan.consume.thread.num}") private int consumerTheadNum; /** * opencv切割成图片后的 考生登记表存放目录 */ @Value("${file.scan.opencv.dir}") private String fileOpencvDir; public String getFileScanDir() { return fileScanDir; } public void setFileScanDir(String fileScanDir) { this.fileScanDir = fileScanDir; } public String getDownloadTemp() { return downloadTemp; } public void setDownloadTemp(String downloadTemp) { this.downloadTemp = downloadTemp; } public String getResultDir() { return resultDir; } public void setResultDir(String resultDir) { this.resultDir = resultDir; } public int getConsumerTheadNum() { return consumerTheadNum; } public void setConsumerTheadNum(int consumerTheadNum) { this.consumerTheadNum = consumerTheadNum; } public String getFileOpencvDir() { return fileOpencvDir; } public void setFileOpencvDir(String fileOpencvDir) { this.fileOpencvDir = fileOpencvDir; } }