File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Autowiring of data source not working

 
Jehan Jaleel
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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?

Thanks.
 
H Paul
Ranch Hand
Posts: 471
4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, have a check the location of the @Service annotation.
Should it be on interface or implementation?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic