错误表现:This application has no explicit mapping for /error, so you are seeing this as a fallback.
在启动类上的注解:@EnableAutoConfiguration
解决:
- 使用这个注解@SpringBootApplication
- 或添加这个注解@ComponentScan(basePackages="com.ruyuan.springBoot")
注:
- @EnableAutoConfiguration + @ComponentScan = @SpringBootApplication
- 在@SpringBootApplication的代码中也可以看出已经封装了上面的两个注解