问题描述
- @SpringBootApplication标红,没有提示,无法启动springboot
- 使用maven构建。通过idea的标准版本构建
原因
springboot构建启动依赖spring-boot-maven-plugin
idea的标准版本没有指定构建版本,然后在springboot-parent里面没有指定默认的版本
新版本idea 2023 springboot不会对于找不到spring-boot-maven-plugin而生成标红提示,@SpringBootApplication也不会,导致难以定位
解决
添加和镜像版本完全一致的version,然后重新构建maven即可

添加这个:
正常