首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >查找servlet url-pattern

查找servlet url-pattern
EN

Stack Overflow用户
提问于 2012-03-02 23:48:49
回答 2查看 625关注 0票数 0

以下URL路径的servlet URL模式应该是什么:

代码语言:javascript
复制
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7bbf68a9: defining beans [restfulController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.BeanNameViewResolver#0,policyView,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number.*] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number/] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA.*] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA/] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.FrameworkServlet initServletBean

我尝试过/restservice*,/restservice/*,但只有/*有效。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-03-06 02:20:07

我可以通过从我的Spring控制器中删除/restservice/来解决这个问题。

票数 0
EN

Stack Overflow用户

发布于 2012-03-06 01:17:30

您应该使用/*。

如果使用"/restservice/*",则必须调用<>/restservice/restservice/ ...您可以尝试使用子缀而不是前缀。比如*.do之类的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9536218

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档