java - GWT + Spring + No bean named 'dispatch' is defined -


while trying use spring dependency injection instead of guice, getting below error

no bean named 'dispatch' defined

[warn] /dispatch/ org.springframework.beans.factory.nosuchbeandefinitionexception: no bean named 'dispatch' defined     @ org.springframework.beans.factory.support.defaultlistablebeanfactory.getbeandefinition(defaultlistablebeanfactory.java:527)     @ org.springframework.beans.factory.support.abstractbeanfactory.getmergedlocalbeandefinition(abstractbeanfactory.java:1083)     @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:274)     @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:194)     @ org.springframework.context.support.abstractapplicationcontext.getbean(abstractapplicationcontext.java:1079)     @ org.springframework.web.context.support.httprequesthandlerservlet.init(httprequesthandlerservlet.java:57)     @ javax.servlet.genericservlet.init(genericservlet.java:212)     @ org.mortbay.jetty.servlet.servletholder.initservlet(servletholder.java:433)     @ org.mortbay.jetty.servlet.servletholder.getservlet(servletholder.java:342)     @ org.mortbay.jetty.servlet.servletholder.handle(servletholder.java:463) 

could please on this.

web.xml content below

<context-param> <param-name>contextconfiglocation</param-name> <param-value>classpath*:meta-inf/applicationcontext.xml</param-value> </context-param>    <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener>   <servlet> <servlet-name>dispatch</servlet-name> <servlet-class>org.springframework.web.context.support.httprequesthandlerservlet</servlet-class> </servlet>  <servlet-mapping> <servlet-name>dispatch</servlet-name> <url-pattern>/dispatch/*</url-pattern> </servlet-mapping> 

and severmodule class

package com.khush.util.server.spring;  import org.springframework.context.annotation.bean; import org.springframework.context.annotation.configuration; import org.springframework.context.annotation.import;  import com.gwtplatform.dispatch.server.actionvalidator.actionvalidator; import com.gwtplatform.dispatch.server.spring.handlermodule; import com.gwtplatform.dispatch.server.spring.actionvalidator.defaultactionvalidator; import com.gwtplatform.dispatch.server.spring.configuration.defaultmodule; import com.khush.util.shared.action.retrieveaccountsaction;  @configuration @import(defaultmodule.class) public class servermodule extends handlermodule {    public servermodule() {   }    @bean   public retrieveaccountshandler getretrieveaccountshandler() {     return new retrieveaccountshandler();   }    @bean   public actionvalidator getdefaultactionvalidator() {     return new defaultactionvalidator();   }    protected void configurehandlers() {       bindhandler(retrieveaccountsaction.class, retrieveaccountshandler.class);   } } 

regards.

can paste in here content of applicationcontext.xml. think forgot add tag :

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

without tag spring can't detect beans outside xml file.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -