Web services 查找servlet url模式

Web services 查找servlet url模式,web-services,spring,servlets,web.xml,url-pattern,Web Services,Spring,Servlets,Web.xml,Url Pattern,以下url路径的servlet url模式应该是什么: INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7bbf68a9: defining beans [restfulController,org.springframework.context.annotation.internalConfigurationAnnotation

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


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/*但只有/*起作用。

您应该使用/*

如果使用“/restservice/*”,则必须调用/restservice/restservice/。。。
您可以尝试使用子前缀而不是前缀。。例如*.do之类。

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

这应该行得通-您可以创建您的Servlet映射吗?@home nope/服务/*不起作用。我是否缺少web.xml中的任何其他servlet元素。@home-policy/service/*Hm,这应该很有效。你有没有尝试过“服务”以外的东西,只是一个猜测?@home我已经更新了我的问题。请再读一遍。使用“/restservice/*”,然后调用/restservice/restservice/。。。也不管用。