问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
自动生成的boot项目启动就报了这个错误
唯一做的操作就是配置了数据库信息而已
ad "restartedMain" 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.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.lang.IllegalAccessError: failed to access class org.springframework.boot.SpringApplicationShutdownHook from class org.springframework.boot.SpringApplication (org.springframework.boot.SpringApplicationShutdownHook is in unnamed module of loader 'app'; org.springframework.boot.SpringApplication is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @4e340e2)
at org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:176)
at com.cy.store.StoreApplication.main(StoreApplication.java:10)