|
@@ -2,6 +2,10 @@ package cn.com.qmth.examcloud.core.questions.starter.config;
|
|
|
|
|
|
import cn.com.qmth.examcloud.core.questions.base.word.DocxProcessUtil;
|
|
|
import cn.com.qmth.examcloud.core.questions.service.impl.SettingService;
|
|
|
+import cn.com.qmth.examcloud.web.config.SystemProperties;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -18,12 +22,20 @@ public class initData implements CommandLineRunner {
|
|
|
|
|
|
@Autowired
|
|
|
SettingService settingService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SystemProperties systemProperties;
|
|
|
|
|
|
@Override
|
|
|
public void run(String... args) throws Exception {
|
|
|
log.info("设置初始化开始");
|
|
|
settingService.initData();
|
|
|
DocxProcessUtil.init();
|
|
|
+ String tempDir = systemProperties.getTempDataDir();
|
|
|
+ File dfile = new File(tempDir);
|
|
|
+ if(!dfile.exists()) {
|
|
|
+ dfile.mkdirs();
|
|
|
+ }
|
|
|
log.info("设置初始化完成");
|
|
|
}
|
|
|
}
|