Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Controller;
- import org.springframework.ui.Model;
- 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.RequestParam;
- @Controller
- public class PostsController {
- @RequestMapping(value = "/specific_post?{postId}", method = RequestMethod.GET)
- public String showSpecificPost(Model model, @PathVariable("postId") String id) {
- System.out.println("showSpecificPost||| postId: " + id);
- return "post";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement