插件'org.springframework.boot:spring-boot-maven-plugin:'未找到。

11 浏览
0 Comments

插件'org.springframework.boot:spring-boot-maven-plugin:'未找到。

我在下面的pom.xml文件中遇到了一个错误:

Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found

以下是我的pom.xml文件:

 

    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.3.5.RELEASE
         
    
    dev.che
    stu
    0.0.1-SNAPSHOT
    stu
    Demo project for Spring Boot
    
        1.8
    
    
        
            org.springframework.boot
            spring-boot-starter-data-jpa
        
        
            org.springframework.boot
            spring-boot-starter-web
        
        
            org.springframework.boot
            spring-boot-devtools
            runtime
true
        
        
            com.h2database
            h2
            runtime
        
        
            org.springframework.boot
            spring-boot-starter-test
            test
            
                
                    org.junit.vintage
                    junit-vintage-engine
                
            
        
    
    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
        
    

我该如何修复这个错误?

admin 更改状态以发布 2023年5月24日
0
0 Comments

我通过在pom.xml中添加一个插件的版本来解决了问题。

${project.parent.version}

0
0 Comments

我通过在pom.xml中添加插件版本号来解决了问题,版本号和spring boot的版本号相同。(并且从spring boot 2.2到2.7.X都可使用)

所以你只需要像这样配置你的pom:


    org.springframework.boot
    spring-boot-maven-plugin
    ${project.parent.version}

0