Advertisement
Guest User

Untitled

a guest
Oct 28th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import org.slf4j.Logger;
  2. import org.slf4j.LoggerFactory;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.ui.Model;
  6. import org.springframework.web.bind.annotation.PathVariable;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestMethod;
  9. import org.springframework.web.bind.annotation.RequestParam;
  10.  
  11.  
  12. @Controller
  13. public class PostsController {
  14.  
  15. @RequestMapping(value = "/specific_post?{postId}", method = RequestMethod.GET)
  16. public String showSpecificPost(Model model, @PathVariable("postId") String id) {
  17. System.out.println("showSpecificPost||| postId: " + id);
  18. return "post";
  19. }
  20.  
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement