spring-nullpointerexception- cant access autowired annotated service (or dao) in a no-annotations class
- by user286806
I have this problem that I cannot fix.
From my @Controller, i can easily access my autowired @Service class and play with it no problem.
But when I do that from a separate class without annotations, it gives me a NullPointerException.
My Controller (works)-
@Controller
public class UserController {
@Autowired
UserService userService;...
My…