以下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/*,但只有/*有效。
发布于 2012-03-06 02:20:07
我可以通过从我的Spring控制器中删除/restservice/来解决这个问题。
发布于 2012-03-06 01:17:30
您应该使用/*。
如果使用"/restservice/*",则必须调用<>/restservice/restservice/ ...您可以尝试使用子缀而不是前缀。比如*.do之类的。
https://stackoverflow.com/questions/9536218
复制相似问题