I am developing OAuth implementation with Jwt tokens.
It's kind of weird but for class TokenAuthenticationService
When I try to Autowired
this class in a different package, I get
Consider defining a bean of type 'com.company.security.TokenAuthenticationService' in your configuration.
I did a workaround and added @Bean TokenAuthenticationService
in that class.
Now when I am trying to initialize an interface in the TokenAuthenticationService
class, it gives the same type of error for that interface.
Consider defining a bean of type 'com.company.security.UserService' in your configuration.
ComponentScan annotation is configured like @ComponentScan({"com.company"})
What I am missing here and why?