|
@@ -1,10 +1,5 @@
|
|
|
package cn.com.qmth.examcloud.core.oe.student.starter;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.commons.util.Util;
|
|
|
-import cn.com.qmth.examcloud.core.oe.student.service.impl.ExamControlServiceImpl;
|
|
|
-import cn.com.qmth.examcloud.web.support.SpringContextHolder;
|
|
|
-import cn.com.qmth.examcloud.web.upyun.UpyunSiteManager;
|
|
|
-import cn.com.qmth.examcloud.web.upyun.UpyunTest;
|
|
|
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
|
@@ -21,22 +16,22 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
|
import org.springframework.web.multipart.MultipartResolver;
|
|
|
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.support.cache.CacheHelper;
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.AppBootstrap;
|
|
|
+import cn.com.qmth.examcloud.web.support.SpringContextHolder;
|
|
|
+import cn.com.qmth.examcloud.web.upyun.UpyunSiteManager;
|
|
|
|
|
|
-@SuppressWarnings("SpringBootApplicationSetup")
|
|
|
@SpringBootApplication
|
|
|
@Configuration
|
|
|
-@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
|
|
|
@EnableJpaAuditing
|
|
|
@EnableTransactionManagement
|
|
|
@EnableEurekaClient
|
|
|
@EnableDiscoveryClient
|
|
|
-@ComponentScan(basePackages = { "cn.com.qmth" })
|
|
|
-@EntityScan(basePackages = { "cn.com.qmth" })
|
|
|
-@EnableJpaRepositories(basePackages = { "cn.com.qmth" })
|
|
|
-@EnableMongoRepositories(basePackages= { "cn.com.qmth" })
|
|
|
-public class CoreOeApp {
|
|
|
+@ComponentScan(basePackages = {"cn.com.qmth"})
|
|
|
+@EntityScan(basePackages = {"cn.com.qmth"})
|
|
|
+@EnableJpaRepositories(basePackages = {"cn.com.qmth"})
|
|
|
+@EnableMongoRepositories(basePackages = {"cn.com.qmth"})
|
|
|
+@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
|
|
|
+public class OEStudentApp {
|
|
|
static {
|
|
|
String runtimeLevel = System.getProperty("log.commonLevel");
|
|
|
if (null == runtimeLevel) {
|
|
@@ -46,32 +41,14 @@ public class CoreOeApp {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- AppBootstrap.run(CoreOeApp.class, args);
|
|
|
+ AppBootstrap.run(OEStudentApp.class, args);
|
|
|
UpyunSiteManager.init();
|
|
|
test();
|
|
|
- /*for(int i=0;i<10000;i++) {
|
|
|
- UpyunTest.testFormApi();
|
|
|
- try {
|
|
|
-// CacheHelper.getSysProperty("oe.examScoreNotify.url.7");
|
|
|
- CacheHelper.getExamRecordProperty(80505L);
|
|
|
- CacheHelper.getExamRecordProperty(9999999999L);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- CacheHelper.getExamRecordProperty(80505L);
|
|
|
- }*/
|
|
|
}
|
|
|
|
|
|
private static void test() {
|
|
|
- /*for(int i=0;i<99999;i++){
|
|
|
- ExamControlServiceImpl bean = SpringContextHolder.getBean(ExamControlServiceImpl.class);
|
|
|
- try {
|
|
|
- bean.cleanExamRecords();
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- Util.sleep(5);
|
|
|
- }*/
|
|
|
+ Tester tester = SpringContextHolder.getBean(Tester.class);
|
|
|
+ tester.test();
|
|
|
}
|
|
|
|
|
|
@Bean(name = "multipartResolver")
|