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

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -