Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <security:authorize access="isAuthenticated()">
  2. <c:redirect url="/users/{userId}/{userName}"></c:redirect>
  3. </security:authorize>
  4.  
  5. @Secured("ROLE_USER")
  6. @RequestMapping(value = "/users/{userId}/{userName}", method = RequestMethod.GET)
  7. public String showUserProfile(Model model,
  8. @PathVariable("userId") Long userId,
  9. @PathVariable("userName") String userName) {
  10. //TODO Do some thing here
  11. return "layout_user_profile";
  12. }
  13.  
  14. http://localhost:8080/users/%7BuserId%7D/%7BuserName%7D
  15.  
  16. HTTP Status 400 -
  17. description The request sent by the client was syntactically incorrect.
  18.  
  19. <c:redirect url="/users/{userId}/{userName}"></c:redirect>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement