wood burning stoves*
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
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: 394
First, have a check the location of the @Service annotation.
Should it be on interface or implementation?
wood burning stoves
subject: Autowiring of data source not working
Similar Threads
IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required
JdbcTemplate and IllegalArgumentException
Problem with the Sample Spring AOP application
Dependency Injection Problem.
Error while Proxying DAO Classes