Aus*_*Gwa 23 java spring intellij-idea maven spring-boot
当使用 springboot 2.7 生成的 start.spring.io 项目时,它附带 MavenProject 3.8.5,当导入 intellij 时,会导致一个非常难以调试或不自言自语的错误。
错误
java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method 'void <init>()' not found
at org.jetbrains.idea.maven.server.embedder.CustomModelValidator.<init>(Unknown Source)
while locating org.jetbrains.idea.maven.server.embedder.CustomModelValidator
at ClassRealm[maven.ext, parent: ClassRealm[plexus.core, parent: null]] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
while locating org.apache.maven.model.validation.ModelValidator annotated with @com.google.inject.name.Named(value="ide")
1 error
role: org.apache.maven.model.validation.ModelValidator
roleHint: ide
Run Code Online (Sandbox Code Playgroud)
小智 43
在 Intellij文件>设置>构建执行... >构建工具> Maven > Maven 主路径下,只需指向您的 maven 目录:

应用并重新加载项目。
| 归档时间: |
|
| 查看次数: |
27433 次 |
| 最近记录: |