一、该问题的重现步骤是什么?
idea可以启动认证模块,认证模块能正常编译打包。
2. 把编译打包的jar包通过命令运行报错:cmd Java -jar bladex-auth.jar
3.
二、你期待的结果是什么?实际看到的又是什么?
D:\workCode\bladex\blade-auth\target>java -jar blade-auth.jar
----启动中,读取到的环境变量:[dev],jar地址:[file:/D:/workCode/bladex/blade-auth/target/blade-auth.jar]----
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:108)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)
Caused by: java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at java.base/java.util.Properties.put(Properties.java:1301)
at java.base/java.util.Properties.setProperty(Properties.java:229)
at org.springblade.core.launch.utils.PropsUtil.setProperty(PropsUtil.java:39)
at org.springblade.common.launch.LauncherServiceImpl.launcher(LauncherServiceImpl.java:40)
at org.springblade.core.launch.BladeApplication.lambda$createSpringApplicationBuilder$0(BladeApplication.java:117)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.springblade.core.launch.BladeApplication.createSpringApplicationBuilder(BladeApplication.java:117)
at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:49)
at org.springblade.auth.AuthApplication.main(AuthApplication.java:37)
... 8 more
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
商业版 3.2.0
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
问题描述的详细一点,给的内容太少了。
看下这两行,对应报错的代码逻辑是什么, 获取的是空指针。
at org.springblade.core.launch.utils.PropsUtil.setProperty(PropsUtil.java:39)
at org.springblade.common.launch.LauncherServiceImpl.launcher(LauncherServiceImpl.java:40)
另外启动需要加命令
java --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED -jar your-application.jar
扫一扫访问 Blade技术社区 移动端