您好,欢迎来到[编程问答]网站首页   源码下载   电子书籍   软件下载   专题
当前位置:首页 >> 编程问答 >> Java >> springmvc rest风格 url-pattern的配置问题

springmvc rest风格 url-pattern的配置问题

来源:网络整理     时间:2016/7/20 19:50:06     关键词:

关于网友提出的“ springmvc rest风格 url-pattern的配置问题”问题疑问,本网通过在网上对“ springmvc rest风格 url-pattern的配置问题”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:

问题: springmvc rest风格 url-pattern的配置问题
描述:

springmvcweb.xmljavarest

 springmvc rest风格 url-pattern的配置问题
 springmvc rest风格 url-pattern的配置问题
上图为web.xml配置,下图是Controller,我通过localhost:8080/projectName/service/123这个路径访问的时候Controller没有收到请求,log:No mapping found for HTTP request with URI [/projectName/service/11],请问这是为什么呢?
解决方案1:

1将值设为1,然后检查你的springmvc-foreground-servlet.xml文件中是否缺少

解决方案2:

很可能,你的代码没有同步过去,导致没有注解配置。。。可以使用文件夹同步工具跟踪一下,

解决方案3:

这种配置 必须 
localhost:8080/projectName/service/service/123 才能访问!


以上介绍了“ springmvc rest风格 url-pattern的配置问题”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/2834218.html

相关图片

相关文章