今天遇到输入正确路径但是,访问404。原因是,
camel.component.servlet.mapping.contextPath
与
server.servlet-path
冲突导致的
因为使用camel ,camel配置如下
camel.component.servlet.mapping.contextPath=/*
项目的根servletpath 未配置,即默认 /*
访问 controller时,一直 404找不到
添加 了如下配置后,解决了问题
server.servlet-path=/rest/*