springboot测试的时候报404(Whitelabel Error Page)

springboot测试 刚学习springboot的时候一直http://localhost:8080/hello一直报错,后面发现如果两个类不在一个包下,或者子包下,是无法扫描到的。 这个时候可以增加注解ComponentScan(value = “com.itsm”)即可 @SpringBootApplication @ComponentScan(value = “com.itsm”) pu
相关文章
相关标签/搜索