wood burning stoves 2.0*
The moose likes Spring and the fly likes Spring Autowire - java.lang.NoSuchMethodException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Autowire - java.lang.NoSuchMethodException" Watch "Spring Autowire - java.lang.NoSuchMethodException" New topic
Author

Spring Autowire - java.lang.NoSuchMethodException

Muhammad Abdul Arif
Greenhorn

Joined: Feb 04, 2012
Posts: 25
Hi All,

I was trying to use annotations in my project which was using SimpleFormControllers. I am stuck in adding @Autowired to one of my DAO class. Below is the code. Can you guys please help me how to autowire this DAO.







Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Yep very simple. your

@Component
public class MemberDAO

Doesn't have a no args constructor, and there is no @Autowired on any of its constructor(s).

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring Autowire - java.lang.NoSuchMethodException