java - Is it possible to use Spring 3 @Autowired annotation inside @Service? -


I am using a class that is not directly spoken by my @Controller and When I try to use the @ etowold property in the code that is defined as @ service , property is null . But @ etowold inside @Controller will work with the same markup.

Example Code:

@Service Public Class User Nominal Authorization Validator {@ Etowar Personal Usdao Userdao;

This should work perfectly when

Your applicationContext.xml has the following:

  & lt; Reference: component-scan base-package = "com.yourproject" />  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -