|
@@ -14,10 +14,8 @@ import org.springframework.context.annotation.Primary;
|
|
import org.springframework.core.task.TaskExecutor;
|
|
import org.springframework.core.task.TaskExecutor;
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
-import sun.misc.Unsafe;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.lang.reflect.Field;
|
|
|
|
|
|
|
|
@SpringBootApplication(scanBasePackages = "com.qmth.*")
|
|
@SpringBootApplication(scanBasePackages = "com.qmth.*")
|
|
@MapperScan({"com.qmth.eds.mapper"})
|
|
@MapperScan({"com.qmth.eds.mapper"})
|
|
@@ -29,22 +27,22 @@ import java.lang.reflect.Field;
|
|
@EnableCaching // 开启缓存注解
|
|
@EnableCaching // 开启缓存注解
|
|
public class EdsServiceApplication {
|
|
public class EdsServiceApplication {
|
|
|
|
|
|
- public static void disableWarning() {
|
|
|
|
- try {
|
|
|
|
- Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
|
|
|
|
- theUnsafe.setAccessible(true);
|
|
|
|
- Unsafe u = (Unsafe) theUnsafe.get(null);
|
|
|
|
-
|
|
|
|
- Class cls = Class.forName("jdk.internal.module.IllegalAccessLogger");
|
|
|
|
- Field logger = cls.getDeclaredField("logger");
|
|
|
|
- u.putObjectVolatile(cls, u.staticFieldOffset(logger), null);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// public static void disableWarning() {
|
|
|
|
+// try {
|
|
|
|
+// Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
|
|
|
|
+// theUnsafe.setAccessible(true);
|
|
|
|
+// Unsafe u = (Unsafe) theUnsafe.get(null);
|
|
|
|
+//
|
|
|
|
+// Class cls = Class.forName("jdk.internal.module.IllegalAccessLogger");
|
|
|
|
+// Field logger = cls.getDeclaredField("logger");
|
|
|
|
+// u.putObjectVolatile(cls, u.staticFieldOffset(logger), null);
|
|
|
|
+// } catch (Exception e) {
|
|
|
|
+// e.printStackTrace();
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
public static void main(String[] args) {
|
|
public static void main(String[] args) {
|
|
- disableWarning();
|
|
|
|
|
|
+// disableWarning();
|
|
SpringApplication.run(EdsServiceApplication.class, args);
|
|
SpringApplication.run(EdsServiceApplication.class, args);
|
|
}
|
|
}
|
|
|
|
|