springboot启动出错
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource
[org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguratio
n$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is
java.lang.IllegalArgumentException: ContextPath must start with '/' and not end with '/'
查看配置文件中
server.servlet.context-path=dyg
原因没有加斜杠
server.servlet.context-path=/dyg
再次启动正常