Pau*_*est 5 java native intellij-idea spring-boot spring-native
刚刚在https://start.spring.io/ Spring Boot 2.4.4 项目上生成,添加了 Spring Boot Native 0.9.1-SNAPSHOT
并且它无法在 IDEA 中启动(因此甚至还没有作为本机映像)
ApplicationContext 无法启动,因为找不到 Spring AOT 插件生成的“org.springframework.aot.StaticSpringFactories”。
满输出
/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
Run Code Online (Sandbox Code Playgroud)
我注意到,对于我通常使用 Web 和 JPA over hibernate 的项目,Initializr 添加了一些额外的 Maven 插件:
/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
Run Code Online (Sandbox Code Playgroud)
请仔细阅读https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#spring-aot,它有 IDEA 的确切步骤(以及 Eclipse 和 VSCode 的提示)
\n\n\n在 Maven 工具窗口中,转到“Plugins”并映射:
\n\n
\n- \n
右键单击
\nspring-aot:generate然后单击“构建后”。- \n
添加 JUnit 配置(或者只是尝试第一次运行测试),然后右键单击“spring-aot:test-generate”,然后单击“执行运行/调试 \xe2\x80\xa6\xe2\x80\x8b”然后选择您的 JUnit 测试配置。
\n
| 归档时间: |
|
| 查看次数: |
5695 次 |
| 最近记录: |