Java Spring - Error: ContextPath must start with '/' and not end with '/'
Java Spring Error: ContextPath must start with '/' and not end with '/'
Exception encountered during context initialization - cancelling refresh attempt: 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 '/'
Config context path hiện tại
Kiểm tra lại config contextPath của application
server:
servlet:
contextPath: context-path-name
Fix
Kiểm tra lại config context path của application
server:
servlet:
contextPath: /context-path-name
Nhận xét
Đăng nhận xét