SpringBoot正常启动,访问项目404的解决方案

首先需要检查: 启动类是否放在所有包的父目录; 或者启动类增加注解@ComponentScan(basePackages={"com.demo.test.*"}) 其次: 在Controller中,使用@RestController注解; 或者使用@Controller注解类,并且使用 ...

Wed Aug 05 23:44:00 CST 2020 0 1681
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM