Skip to content

Instantly share code, notes, and snippets.

@banterCZ
Created February 4, 2013 07:56
Show Gist options
  • Save banterCZ/4705498 to your computer and use it in GitHub Desktop.
Save banterCZ/4705498 to your computer and use it in GitHub Desktop.
Spring REST and e-mail as a parameter
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class UserController {
@RequestMapping(value = "/users/{email:.+}", method = RequestMethod.GET)
public @ResponseBody User getUserDetails(@PathVariable("email") String email) {
//TODO
return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment