|
@@ -32,17 +32,13 @@ import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.multipart.MultipartResolver;
|
|
import org.springframework.web.multipart.MultipartResolver;
|
|
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
|
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
|
|
|
|
|
-//import com.qmth.commons.query.dao.impl.BaseQueryDaoImpl;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 项目入口主程序
|
|
* 项目入口主程序
|
|
*/
|
|
*/
|
|
@ComponentScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@ComponentScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@EntityScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@EntityScan(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
-//@EnableJpaRepositories(basePackages = { "com.qmth.commons",
|
|
|
|
-// "cn.com.qmth" }, repositoryBaseClass = BaseQueryDaoImpl.class)
|
|
|
|
-@EnableJpaRepositories(basePackages = {"com.qmth.commons",
|
|
|
|
- "cn.com.qmth"})
|
|
|
|
|
|
+//@EnableJpaRepositories(basePackages = { "com.qmth.commons", "cn.com.qmth" }, repositoryBaseClass = BaseQueryDaoImpl.class)
|
|
|
|
+@EnableJpaRepositories(basePackages = {"com.qmth.commons", "cn.com.qmth"})
|
|
@EnableMongoRepositories("cn.com.qmth.examcloud.core.questions.dao")
|
|
@EnableMongoRepositories("cn.com.qmth.examcloud.core.questions.dao")
|
|
@SpringBootApplication
|
|
@SpringBootApplication
|
|
@EnableEurekaClient
|
|
@EnableEurekaClient
|
|
@@ -51,44 +47,15 @@ import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
|
public class Application {
|
|
public class Application {
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(Application.class);
|
|
private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(Application.class);
|
|
@Autowired
|
|
@Autowired
|
|
- GridFSUtil gridFSUtil;
|
|
|
|
|
|
+ private GridFSUtil gridFSUtil;
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
if (LOG instanceof SLF4JImpl) {
|
|
if (LOG instanceof SLF4JImpl) {
|
|
MDC.put("TRACE_ID", Thread.currentThread().getName());
|
|
MDC.put("TRACE_ID", Thread.currentThread().getName());
|
|
}
|
|
}
|
|
|
|
|
|
- //SpringApplication.run(Application.class, args);429
|
|
|
|
|
|
+ //SpringApplication.run(Application.class, args);
|
|
ExamCloudApp.run(Application.class, "questions", args);
|
|
ExamCloudApp.run(Application.class, "questions", args);
|
|
-
|
|
|
|
- //用来导出调卷规则中,生成的主观题和客观题的Excel(导出调卷规则)
|
|
|
|
- /*ExtractConfigFileService service = SpringContextHolder.getBean(ExtractConfigFileService.class);
|
|
|
|
- ExportPaperInfoModel model = new ExportPaperInfoModel();
|
|
|
|
- model.setExamId("429");
|
|
|
|
- model.setExportWay(ExportWay.BATCH);
|
|
|
|
- List<String> list = new ArrayList<String>();
|
|
|
|
- list.add(ExamFileType.PAPER_STRUCTURE_OBJECTIVE.name());
|
|
|
|
- model.setExportContentList(list);
|
|
|
|
- try {
|
|
|
|
- service.exportExamPaperInfo(model, null, "weiwenhai", null, null);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }*/
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //用来导出给定课程关联中的主观题信息的Excel(导出课程下的主观题试题分布)
|
|
|
|
- /*DdExcelService ddExcelService = SpringContextHolder.getBean(DdExcelService.class);
|
|
|
|
- List<String> codes = new ArrayList<String>();
|
|
|
|
- codes.add("D00010005");
|
|
|
|
- codes.add("D02020001");
|
|
|
|
- codes.add("D07020006");
|
|
|
|
- codes.add("F00010007");
|
|
|
|
- codes.add("F00010018");
|
|
|
|
- try {
|
|
|
|
- ddExcelService.exportSubQues("1627", 326l, codes);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }*/
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
@@ -129,4 +96,5 @@ public class Application {
|
|
resolver.setMaxUploadSize(200 * 1024 * 1024);
|
|
resolver.setMaxUploadSize(200 * 1024 * 1024);
|
|
return resolver;
|
|
return resolver;
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+}
|