作者:mthp | 来源:互联网 | 2023-10-12 15:00
org.springframework.context.ApplicationContextException:Unabletostartwebserver;nestedexcep
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tomcatServletWebServerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: ContextPath must start with '/' and not end with '/'
根据报错,发现是上下文路径缺少了“/”这个小细节一定要注意