Java Spring原生0.9.1-SNAPSHOT无法在IDEA中启动
刚在SpringBoot2.4.4项目上生成,添加了SpringBootNative0.9.1-SNAPSHOT 而且它无法在理念中启动(因此,即使是原生图像也无法启动) ApplicationContext无法以“org.springframework.aot.StaticSpringFactories”的形式启动,因为找不到SpringAOT插件生成的“org.springframework.aot.StaticSpringFactories” 满输出Java Spring原生0.9.1-SNAPSHOT无法在IDEA中启动,java,spring-boot,intellij-idea,native,spring-native,Java,Spring Boot,Intellij Idea,Native,Spring Native,刚在SpringBoot2.4.4项目上生成,添加了SpringBootNative0.9.1-SNAPSHOT 而且它无法在理念中启动(因此,即使是原生图像也无法启动) ApplicationContext无法以“org.springframework.aot.StaticSpringFactories”的形式启动,因为找不到SpringAOT插件生成的“org.springframework.aot.StaticSpringFactories” 满输出 /Library/Java/JavaV
/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java "-javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=52158:/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath ....
2021-03-20 22:07:21.264 ERROR 10192 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The ApplicationContext could not start as 'org.springframework.aot.StaticSpringFactories' that is generated by the Spring AOT plugin could not be found.
Action:
Review your local configuration and make sure that the Spring AOT plugin is configured properly.
If you're trying to run your application with 'mvn spring-boot:run', please use 'mvn package spring-boot:run' instead.
See https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#spring-aot for more details.
Process finished with exit code 1
我注意到,对于我通常使用Web和JPA over hibernate的项目,Initializer添加了一些额外的maven插件:
org.springframework.boot
springbootmaven插件
org.projectlombok
龙目
PakeToBuildPack/builder:tiny
真的
org.springframework.experimental
SpringAOTMaven插件
${spring native.version}
测试生成
测试生成
生成
生成
org.hibernate.orm.tooling
hibernate增强maven插件
${hibernate.version}
增强
增强
真的
真的
真的
真的
假的
请仔细阅读,它有IDEA的确切步骤(以及Eclipse和VSCode的提示)
在Maven工具窗口中,转到“插件”并映射:
- 右键单击
,然后单击“构建后”springaot:generate
- 添加JUnit配置(或者尝试运行第一次测试),然后右键单击`SpringAOT:TestGenerate',然后单击“执行运行/调试…”…" 然后选择JUnit测试配置
下面是一个快照,可以在我的IDE中配置它 检查
源代码是在target/generated Sources/spring aot/
中生成的,因此我确实从命令行mvn包运行了maven,并且可能会转到下一个错误