1、IDEA一直访问不到 https://start.spring.io/ 。于是我就直接从改网站上下载下来,再导入IDEA。
2、自动生成的pom文件没有下面这个配置,导致@RequestMapping注解无法使用。加上就好
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
3、会报日志什么有的没的错误。加上日志的配置,不要加版本号。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
4、找不到启动类,最容易出现的问题。
(1)、
(2)、把这个直接删掉
(3)、点击Add Content Root ,选中你的启动类在的目录
(4)、apply就好了!