Springboot启动成功不报错,但是页面访问失败,报404
原因是我在启动类上面配置了包扫描,但是没有配置controller包的扫描(因为controller包跟启动类在同一包下,我以为会被自动扫描到)
附上错误代码:
@SpringBootApplication
@EntityScan("com.hello.domain")
@ComponentScan(basePackages = {"com.hello.interface"})
public cl...
原创
2019-09-08 16:13:58 ·
4824 阅读 ·
0 评论