Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. @RequestMapping(value = "/users", method = RequestMethod.GET)
  2. public @ResponseBody ResponseEntity<List<Usuario>> listUsers () {
  3. return new ResponseEntity<List<Usuario>>(usuarioService.listaDeUsuarios(), HttpStatus.OK);
  4. }
  5.  
  6. $http.get('http://localhost:8080/users').then(function(resp) {
  7. console.log('Success', resp.data);
  8. }, function(err) {
  9. console.error('ERR', err.status);
  10. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement