路径正确,但404的问题

今天遇到输入正确路径但是,访问404。原因是,

camel.component.servlet.mapping.contextPath

 与

server.servlet-path

冲突导致的

因为使用camel ,camel配置如下

camel.component.servlet.mapping.contextPath=/*

项目的根servletpath 未配置,即默认 /*

访问 controller时,一直 404找不到 

添加 了如下配置后,解决了问题

server.servlet-path=/rest/*

猜你喜欢

转载自blog.csdn.net/qq_36657997/article/details/84874399