File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Autowiring of data source not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Autowiring of data source not working" Watch "Autowiring of data source not working" New topic

Autowiring of data source not working

Jehan Jaleel
Ranch Hand

Joined: Apr 30, 2002
Posts: 196

I have a simple example where I have a Spring service bean that I want to use to query the DB (I know I should probably use a DAO but this is just an example), I have the following code...

Interface file...

Implementation file..

And in my Spring config file I have...

Right now this is giving exception...

Any suggestions?

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
First, have a check the location of the @Service annotation.
Should it be on interface or implementation?
jQuery in Action, 3rd edition
subject: Autowiring of data source not working
It's not a secret anymore!