Resolved the exception w.r.t @Autowired