java - Reference "auto detected" bean in Spring's context -


i configured spring auto-detect daos using

<context:component-scan base-package="com.mycomp.app" /> <tx:annotation-driven />.  @repository("transactiondao") public class transactiondao { ... } 

now i'm configuring manually in context bean references one.

<property name="schedulercontextasmap">     <map>        <entry key="transactiondao" value-ref="transactiondao" />     </map> </property> 

now spring's complaining:

caused by: org.springframework.beans.factory.nosuchbeandefinitionexception: no bean named 'transactiondao' defined 

is possible reference auto detected bean inside context?

is possible reference auto detected bean inside context? 

yes possible.

in order see why transactiondao bean not found, can verify following things:

  1. transactiondao should in classpath , lies in sub-package of com.mycomp.app

  2. if step-1 there, run application logger level org.springframework set debug , can see in startup logs of spring beans got initialized.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -