成佛的小兔几
2018-05-03 11:48
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.0.BUILD-SNAPSHOT</version> </parent> <repositories> <repository> <id>spring-snapshots</id> <name>Spring Snapshots</name> <url>https://repo.spring.io/libs-snapshot</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>
之前我没有加入spring-boot-starter-web依赖的时候
是可以访问到
这个路由的
但是加上
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
这个依赖之后
就没有@Configuration配置的路由了,也访问不到,只能访问到@RestController
这是版本的问题吗?还是我哪里配置错了
同问,为什么Tomcat不行
使用spring-boot-starter-web模块后,默认使用Netty容器吧
使用spring-boot-starter-web模块后,默认使用了tomcat容器
Spring Boot 2.0深度实践-初遇Spring Boot
75477 学习 · 221 问题
相似问题