0

I have annotated my spring classes , however whenever I fire the webservice for the second time I get the null exception. For the first time it works fine.

I have Autowired the dao classes.

@Component
public class JdbcUserDAO implements UserDAO {

@Component
@XmlRootElement(name = "user")
public class User {
    private static final Logger log = LoggerFactory.getLogger(User.class);
    //private JdbcUserDAO jdbcUserDao = new JdbcUserDAO();
    @Autowired
    JdbcUserDAO jdbcUserDao;

    @RequestMapping(value = "/editprofile", method = RequestMethod.POST,consumes = "application/json", produces = "application/json")
    public Response<User> editProfile(@RequestBody User userIn) {       
        Response<User> response = new Response<User>();
        user =  user.edit(userIn);
Xstian
  • 8,184
  • 10
  • 42
  • 72
Chetan
  • 1,141
  • 2
  • 15
  • 36

0 Answers0