|
@@ -1,10 +1,10 @@
|
|
package `in`.ocsf.bee.freigeld.core
|
|
package `in`.ocsf.bee.freigeld.core
|
|
|
|
|
|
-import `in`.ocsf.bee.freigeld.core.cl.*
|
|
|
|
|
|
+import `in`.ocsf.bee.freigeld.core.cl.Sample0
|
|
|
|
+import `in`.ocsf.bee.freigeld.core.cl.Sample1
|
|
import org.springframework.boot.SpringApplication
|
|
import org.springframework.boot.SpringApplication
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
|
import org.springframework.context.annotation.PropertySource
|
|
import org.springframework.context.annotation.PropertySource
|
|
-import org.springframework.context.annotation.PropertySources
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping
|
|
import org.springframework.web.bind.annotation.RequestMapping
|
|
import org.springframework.web.bind.annotation.RestController
|
|
import org.springframework.web.bind.annotation.RestController
|
|
import sun.misc.Unsafe
|
|
import sun.misc.Unsafe
|
|
@@ -25,19 +25,24 @@ class DevController{
|
|
|
|
|
|
@RequestMapping("dev/test0")
|
|
@RequestMapping("dev/test0")
|
|
fun test0() {
|
|
fun test0() {
|
|
- Sample().run();
|
|
|
|
|
|
+ Sample0().run()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @RequestMapping("dev/test1")
|
|
|
|
+ fun test1() {
|
|
|
|
+ Sample1().run()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
fun main(args: Array<String>) {
|
|
fun main(args: Array<String>) {
|
|
- disableWarning();
|
|
|
|
|
|
+ disableWarning()
|
|
SpringApplication.run(FreiApp::class.java, *args)
|
|
SpringApplication.run(FreiApp::class.java, *args)
|
|
}
|
|
}
|
|
|
|
|
|
fun disableWarning() {
|
|
fun disableWarning() {
|
|
try {
|
|
try {
|
|
- val theUnsafe = Unsafe::class.java!!.getDeclaredField("theUnsafe")
|
|
|
|
- theUnsafe.setAccessible(true)
|
|
|
|
|
|
+ val theUnsafe = Unsafe::class.java.getDeclaredField("theUnsafe")
|
|
|
|
+ theUnsafe.isAccessible = true
|
|
val u = theUnsafe.get(null) as Unsafe
|
|
val u = theUnsafe.get(null) as Unsafe
|
|
val cls = Class.forName("jdk.internal.module.IllegalAccessLogger")
|
|
val cls = Class.forName("jdk.internal.module.IllegalAccessLogger")
|
|
val logger = cls.getDeclaredField("logger")
|
|
val logger = cls.getDeclaredField("logger")
|