解决Spring Boot Application in default package方法

在这里插入图片描述

问题原因

  • 因为没有把main函数放入包内,将main方法所在类放入包内即可

效果图

在这里插入图片描述
sprint官方给出包结构的相关建议:
在这里插入图片描述
下面是链接地址,请参考

https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot

猜你喜欢

转载自blog.csdn.net/xywxhzsjhh/article/details/115224883