|
@@ -7,34 +7,32 @@
|
|
|
|
|
|
package cn.com.qmth.examcloud.app;
|
|
|
|
|
|
-import cn.com.qmth.examcloud.commons.logging.ExamCloudLog;
|
|
|
-import cn.com.qmth.examcloud.commons.logging.ExamCloudLogFactory;
|
|
|
-import cn.com.qmth.examcloud.commons.logging.SLF4JImpl;
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.AppBootstrap;
|
|
|
-import org.slf4j.MDC;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.boot.builder.SpringApplicationBuilder;
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
|
|
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
|
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
|
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
|
|
|
@EnableAsync
|
|
|
@EnableJpaAuditing
|
|
|
+@EnableEurekaClient
|
|
|
+@EnableDiscoveryClient
|
|
|
@SpringBootApplication
|
|
|
public class ApiApplication extends SpringBootServletInitializer {
|
|
|
- private static final ExamCloudLog LOG = ExamCloudLogFactory.getLog(ApiApplication.class);
|
|
|
-
|
|
|
- public static void main(String[] args) {
|
|
|
- if (LOG instanceof SLF4JImpl) {
|
|
|
- MDC.put("TRACE_ID", Thread.currentThread().getName());
|
|
|
- }
|
|
|
|
|
|
+ static {
|
|
|
String runtimeLevel = System.getProperty("log.commonLevel");
|
|
|
if (null == runtimeLevel) {
|
|
|
System.setProperty("log.commonLevel", "DEBUG");
|
|
|
}
|
|
|
+ System.setProperty("hibernate.dialect.storage_engine", "innodb");
|
|
|
+ }
|
|
|
|
|
|
+ public static void main(String[] args) {
|
|
|
//SpringApplication.run(ApiApplication.class, args);
|
|
|
AppBootstrap.run(ApiApplication.class, args);
|
|
|
}
|