Spring Service annotation
Hi,
I have a spring service
like
Code:
@Service("UserService")
public class UserService implements IUserService, UserDetailsService
if i remove the ("UserService") I get the below error
Code:
Cannot resolve reference to bean 'UserService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'UserService' is defined
My understanding is that if the service bean name is not provided, it will take the class name as bean name.
But as per this error, it is not working like that.
Is the bean name mandatory ? or am i missing some thing.