Skip to content

Instantly share code, notes, and snippets.

@andreybleme
Created April 1, 2017 15:36
Show Gist options
  • Save andreybleme/ca5031efe11f30bdc11fde80ac0b818d to your computer and use it in GitHub Desktop.
Save andreybleme/ca5031efe11f30bdc11fde80ac0b818d to your computer and use it in GitHub Desktop.
andreybleme.com | JWT com Springboot
package com.jwtme.controllers;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class UserController {
@RequestMapping("/users")
@ResponseBody
public String getUsers() {
return "{\"users\":[{\"name\":\"Lucas\", \"country\":\"Brazil\"}," +
"{\"name\":\"Jackie\",\"country\":\"China\"}]}";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment