mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 07:57:26 +08:00
[U] Use kotlin entrypoint
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
package icu.samnyan.aqua;
|
|
||||||
|
|
||||||
import icu.samnyan.aqua.sega.aimedb.AimeDbServer;
|
|
||||||
import icu.samnyan.aqua.spring.util.AutoChecker;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
public class AquaServerApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
|
||||||
ConfigurableApplicationContext ctx = SpringApplication.run(AquaServerApplication.class, args);
|
|
||||||
|
|
||||||
final AimeDbServer aimeDbServer = ctx.getBean(AimeDbServer.class);
|
|
||||||
aimeDbServer.start();
|
|
||||||
|
|
||||||
final AutoChecker checker = ctx.getBean(AutoChecker.class);
|
|
||||||
checker.check();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
22
src/main/java/icu/samnyan/aqua/AquaServerApplication.kt
Normal file
22
src/main/java/icu/samnyan/aqua/AquaServerApplication.kt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
package icu.samnyan.aqua
|
||||||
|
|
||||||
|
import icu.samnyan.aqua.sega.aimedb.AimeDbServer
|
||||||
|
import icu.samnyan.aqua.spring.util.AutoChecker
|
||||||
|
import org.springframework.boot.SpringApplication
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
class AquaServerApplication
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Main method, entry point of the application
|
||||||
|
*/
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
val ctx = SpringApplication.run(AquaServerApplication::class.java, *args)
|
||||||
|
|
||||||
|
val aimeDbServer = ctx.getBean(AimeDbServer::class.java)
|
||||||
|
aimeDbServer.start()
|
||||||
|
|
||||||
|
val checker = ctx.getBean(AutoChecker::class.java)
|
||||||
|
checker.check()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user