项目是 spring boot + mirai-core-all
一段时间没有更新,因为看到qsign升级1.3.0版本了 所以想着也更新一下,对应的 mirai2.jar 包 以及 其对应的 txlib包 都是在github上下载的
升级前可以正常启动,验证登录,将 qsign升级至1.3.0后 ,启动项目发生报错
16:27:07 [main] ERROR org.springframework.boot.SpringApplication - Application run failed java.lang.IllegalStateException: Failed to execute ApplicationRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:789) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:776) at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at com.whitemagic2014.WMagicBotRApplication.main(WMagicBotRApplication.java:10) Caused by: kotlin.UninitializedPropertyAccessException: lateinit property CONFIG has not been initialized at DataKt.getCONFIG(Data.kt:5) at top.mrxiaom.qsign.QSignService$Factory$Companion.loadConfigFromFile(QSignService.kt:242) at top.mrxiaom.qsign.QSignService$Factory.loadConfigFromFile(QSignService.kt) at com.whitemagic2014.Simulator.setupNew(Simulator.java:106) at com.whitemagic2014.Simulator.run(Simulator.java:77) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:786) ... 5 common frames omittedlateinit property CONFIG has not been initialized
这个问题百度搜了一下,貌似是kt 和 spring 结合使用的时初始化的问题,具体代码为 qsign java的示例
由于我不太懂 kotlin,不知道要如何处理目前的问题,希望有大佬可以帮助一下