我已经注释了我的spring类,但是每当我第二次触发webservice时,我都会得到null异常。它第一次工作正常。
我已经自动安装了dao课程。
@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);