Idea SpringBoot 用main方法启动 访问页面Whitelabel Error Page

Idea SpringBoot 用main方法启动 访问页面Whitelabel Error Page There was an unexpected error (type=Not Found, status=404

错误信息:浏览器请求spring-boot模块项目报:There was an unexpected error (type=Not Found, status=404)
在这里插入图片描述

场景:Idea SpringBoot maven多工程依赖 main方法启动项目
解决方法:
①点击Edit Configrations,见下图
在这里插入图片描述

②Working directory里面选择的路径指向XxxApplication所在的maven子工程文件夹,见下图
在这里插入图片描述
③右下角apply之后再次用main方法启动项目再次访问页面 搞定

猜你喜欢

转载自blog.csdn.net/weixin_43738907/article/details/89679130