spring boot常见问题
一、项目启动后,访问controller报404错误:
1.项目web依赖为:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>5.2.4.RELEASE</version> </dependency>
正确的应该为spring boot的web依赖为:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version>1.5.11.RELEASE</version> </dependency>