Spring boot @使用SpringBootStarter父版本1.5.9.0时,无法识别SpringBootApplication
从SpringSTS开始,我创建了一个全新的SpringBoot项目启动程序,添加了“WEB”特性,然后完成了项目的创建 由于某种原因,进口Spring boot @使用SpringBootStarter父版本1.5.9.0时,无法识别SpringBootApplication,spring-boot,Spring Boot,从SpringSTS开始,我创建了一个全新的SpringBoot项目启动程序,添加了“WEB”特性,然后完成了项目的创建 由于某种原因,进口 import org.springframework.boot.autoconfigure.SpringBootApplication; 无法识别(我得到-“无法解析导入org.springframework.boot.autoconfigure.springboot应用程序”) 因此@SpringBootApplication注释也无法识别 packa
import org.springframework.boot.autoconfigure.SpringBootApplication;
无法识别(我得到-“无法解析导入org.springframework.boot.autoconfigure.springboot应用程序”)
因此@SpringBootApplication注释也无法识别
package com.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Newtest1sdfsdfApplication {
public static void main(String[] args) {
SpringApplication.run(Newtest1sdfsdfApplication.class, args);
}
}
注意:我使用的是自动创建的项目
如果我更改SpringBootStarter父级的项目版本(在pom.xml中)
从1.5.9到1.5.8,一切又恢复正常。设置回1.5.9将显示错误
含义从:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
org.springframework.boot
spring启动程序父级
1.5.9.1发布
到
org.springframework.boot
spring启动程序父级
1.5.8.1发布
你知道这里有什么问题吗?我最后说:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>