情境
使用遇到了 SpringBoot 1.5.2.RELEASE 版本遇到了 server.context-path 配置不起作用的问题。
进入设计好的 url 对应报错 Whitelabel Error Page 如下:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Fri Nov 29 10:20:28 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available
解决
简单分析一下,根据报错也就是没找到嘛,检查代码没什么问题那就是配置这里的问题了。
错误的配置:
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
username: root