SpringBoot学习之启动报错【This application has no explicit mapping for /error.....】
今天做SpringBoot小例子,在请求controller层的时候出现如下问题。
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
问题很像是没有访问地址不对,第一感觉以为url写的不对。
其实不是,真正的原因是【Application启动类放的位置不对】要将Application放在最外层,也就是要包含所有子包。
比如你的groupId是com.google,子包就是所谓的com.google.xxx,所以要将Application类要放在com.google包下。
springboot会自动加载启动类所在包下及其子包下的所有组件.
SpringBoot学习之启动报错【This application has no explicit mapping for /error.....】的更多相关文章
- 1. SpringBoot启动后,报异常:This application has no explicit mapping for /error, so you are seeing this as a fallback.
出现这个异常说明了跳转页面的url无对应的值. 原因1: Application启动类的位置不对.要将Application类放在最外侧,即包含所有子包 原因:spring-boot会自动加载启动类所 ...
- 新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo
新建SpringBoot项目运行页面报错Whitelabel Error Page This application has no explicit mapping for /error, so yo ...
- Springboot启动后报错【This application has no explicit mapping for /error, so you are seeing this as a fallback····】
This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 1 ...
- SpringBoot Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.
使用SpringBoot写HelloWorld,当配置好启动类后,再创建新的controller或其它类,启动项目后访问对应的映射名,页面显示: Whitelabel Error Page This ...
- Springboot集成ES启动报错
报错内容 None of the configured nodes are available elasticsearch.yml配置 cluster.name: fans node.name: no ...
- SpringBoot发布WAR启动报错:Error assembling WAR: webxml attribute is required
Spring Boot发布war包流程: 1.修改web model的pom.xml <packaging>war</packaging> SpringBoot默认发布的都是j ...
- SpringBoot整合nacos启动报错:java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
报错信息 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nacosCo ...
- springboot多数据源启动报错:required a single bean, but 6 were found:
技术群: 816227112 参考:https://stackoverflow.com/questions/43455869/could-not-autowire-there-is-more-than ...
- 启动Springboot 报错 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sat Jan 12 15:50:25 CST 2019 There was an unexpected error (type=Not
解决方案:http://www.cnblogs.com/michaelShao/p/6675186.html
随机推荐
- H.264分层结构与码流结构
H.264分层结构 H.264编码器输出的Bit流中,每个Bit都隶属于某个句法元素.句法元素被组织成有层次的结构,分别描述各个层次的信息. 在H.264 中,句法元素共被组织成 序列.图像.片.宏 ...
- angularJS $scope的$apply方法实现model刷新
控制器内,$scope有个$apply方法,可以代码更改model并同步更新页面.通常,控制器内的方法执行完毕后仅会自动刷新一次页面展示,使用$apply方法即可在想刷新页面时就刷新.如本例,这个方法 ...
- angular controller与directive相互引用
/** * Created by Administrator on 2017/8/28. */ var app =angular.module('app',[]); app.directive('fo ...
- kali2018 安装****
1.安装需要的依赖包: apt-get install qt5-qmake qtbase5-dev libqrencode-dev libappindicator-dev libzbar-dev ro ...
- 通过日志动态查看正在执行的mysql语句
通过日志动态查看正在执行的mysql语句 :tail -f /tmp/general_log.log
- POJ 1038 Bugs Integrated, Inc. ——状压DP
状态压缩一下当前各格子以及上面总共放了几块,只有012三种情况,直接三进制保存即可. 然后转移的时候用搜索找出所有的状态进行转移. #include <map> #include < ...
- 算法复习——序列分治(ssoj光荣的梦想)
题目: 题目描述 Prince对他在这片大陆上维护的秩序感到满意,于是决定启程离开艾泽拉斯.在他动身之前,Prince决定赋予King_Bette最强大的能量以守护世界.保卫这里的平衡与和谐.在那个时 ...
- asp.net mvc 页面内容呈现Html.Raw HtmlString
asp.net mvc 页面内容呈现Html.Raw Html.Raw内容经过页面呈现,不呈现Html标签 @Html.Raw( File.ReadAllText(Server.MapPath(&qu ...
- Lucky and Good Months by Gregorian Calendar(poj 3393)
大致题意: 科普文一篇,文章80%都是无用信息,因为都是常识,但是又不得不看,因为有20%是常人不知道的历史常识. 定义: Goog month : 该月第一个工作日为星期一的月份 Luckly mo ...
- TYVJ3680 找妹子
时间: 1000ms / 空间: 1200KiB / Java类名: Main 背景 本题由 @fjzzq2002 提供,已奖励20金币. 描述 sps是zzq的好伙伴. sps一天叫来了许多个妹子. ...