2

アプリケーションの 1 つを Spring ツール スーツ IDE から純粋な Eclipse Java EE IDE に移植しています。この過程で、いくつかのパッケージの名前を変更し、Maven ベースに変更しました。その後、すべてのコントローラーが機能しなくなります。

注釈コントローラーの検出が壊れているようです。SpringにはマッピングURLが登録されていません。

誰が問題が何であるかを知っていますか?

STS(作業中)から古いログを収集しましたが、動作し、好きです

> 2013-04-21 22:43:05,622 [Thread-1] DEBUG
> org.springframework.beans.factory.support.DefaultListableBeanFactory -
> Finished creating instance of bean
> 'org.springframework.web.servlet.handler.MappedInterceptor#2'
> 2013-04-21 22:43:05,623 [Thread-1] DEBUG
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
> - Looking for request mappings in application context: WebApplicationContext for namespace 'HelloSpringroo2-servlet': startup
> date [Sun Apr 21 22:43:05 EDT 2013]; parent: Root
> WebApplicationContext 2013-04-21 22:43:05,653 [Thread-1] INFO 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
> - Mapped "{[/account/create],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}"
> onto public java.lang.String
> com.hellospringroo.controllers.AccountController.createAccountActionDisplay(org.springframework.ui.Model)
> 2013-04-21 22:43:05,653 [Thread-1] INFO 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
> - Mapped "{[/account/view/{account_Id}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}"
> onto public java.lang.String
> com.hellospringroo.controllers.AccountController.viewAccountActionDisplay(int,org.springframework.ui.Model)
> throws java.lang.Exception

次に、Eclipse からログを収集します (問題 1)。

> 2013-04-21 22:48:04,900 [http-bio-8080-exec-3] DEBUG
> org.springframework.web.servlet.DispatcherServlet - DispatcherServlet
> with name 'Education' processing GET request for [/Education/]
> 2013-04-21 22:48:04,901 [http-bio-8080-exec-3] DEBUG
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
> - Looking up handler method for path / 2013-04-21 22:48:04,901 [http-bio-8080-exec-3] DEBUG
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping
> - Did not find handler method for [/] 2013-04-21 22:48:04,904 [http-bio-8080-exec-3] DEBUG
> org.springframework.web.servlet.handler.SimpleUrlHandlerMapping -
> Mapping [/] to HandlerExecutionChain with handler
> [org.springframework.web.servlet.mvc.ParameterizableViewController@54bbb2d0]
> and 1 interceptor 2013-04-21 22:48:04,905 [http-bio-8080-exec-3] DEBUG
> org.springframework.web.servlet.DispatcherServlet - Last-Modified
> value for [/Education/] is: -1 2013-04-21 22:48:04,914
> [http-bio-8080-exec-3] DEBUG
> org.springframework.beans.factory.support.DefaultListableBeanFactory -
> Invoking afterPropertiesSet() on bean with name 'index'
4

2 に答える 2

2

君の:

<context:component-scan base-package="old.package.name" />

今あるべき

<context:component-scan base-package="new.package.name" />
于 2013-04-22T03:45:39.050 に答える