Web アプリケーションをセットアップしていて、Java の代わりに Groovy を使用しようとしています。基本的なセットアップが完了し、webapp が起動します。これまでのところ、適切な注釈を付けたコントローラーが 1 つあります。起動時に RequestMappings がマップされますが、マッピングにアクセスしようとすると、webapp が 404 で応答します。
この投稿を見たことがありますが、問題は解決しませんでした (インターフェイスも PostProcessor も使用していません)。
アプリケーションの起動からのログは次のとおりです。奇妙な点は何も見られません。
17:16:10.231 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization started
17:16:10.235 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Tue Jan 22 17:16:10 CET 2013]; root of context hierarchy
17:16:10.296 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext - Registering annotated classes: [class de.rpr.query.config.AppConfig]
17:16:10.902 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.b.f.s.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7d21c8c4: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,appConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,queryController,delegatingWebMvcConfiguration,requestMappingHandlerMapping,viewControllerHandlerMapping,beanNameHandlerMapping,resourceHandlerMapping,defaultServletHandlerMapping,requestMappingHandlerAdapter,mvcConversionService,mvcValidator,httpRequestHandlerAdapter,simpleControllerHandlerAdapter,handlerExceptionResolver,webConfig,jacksonObjectMapper,jacksonMessageConverter,viewResolver,groovyObjectPostProcessor]; root of factory hierarchy
17:16:11.060 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/query/show],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.Object de.rpr.query.controller.QueryController.showQueryForm()
17:16:11.124 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler]
17:16:11.638 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 1403 ms
17:16:11.649 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcher': initialization started
17:16:11.656 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext - Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Tue Jan 22 17:16:11 CET 2013]; parent: Root WebApplicationContext
17:16:11.660 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.c.s.AnnotationConfigWebApplicationContext - Registering annotated classes: [class de.rpr.query.config.WebConfig]
17:16:11.701 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.b.f.s.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@35d0be7c: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,webConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0,delegatingWebMvcConfiguration,requestMappingHandlerMapping,viewControllerHandlerMapping,beanNameHandlerMapping,resourceHandlerMapping,defaultServletHandlerMapping,requestMappingHandlerAdapter,mvcConversionService,mvcValidator,httpRequestHandlerAdapter,simpleControllerHandlerAdapter,handlerExceptionResolver,jacksonObjectMapper,jacksonMessageConverter,viewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@7d21c8c4
17:16:11.829 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler]
17:16:11.971 [RMI TCP Connection(3)-127.0.0.1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcher': initialization completed in 322 ms
これはコントローラーです:
@Controller
@RequestMapping("/mapping")
class QueryController {
@RequestMapping("/show")
def show() {
return "show";
}
}
私は何かを見逃していますか、何か間違っていますか?ヘルプは大歓迎です!