Class ForumViewController

java.lang.Object
com.bytedesk.forum.controller.ForumViewController

@Controller @RequestMapping("/forum") public class ForumViewController extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
     
    private PostService
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAttributes(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
     
    category(Long categoryId, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    createPost(Long categoryId, org.springframework.ui.Model model)
     
    editPost(Long postId, org.springframework.ui.Model model)
     
     
    post(Long postId, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    search(String keyword, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    userComments(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    userLikes(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    userPosts(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, org.springframework.data.domain.Pageable pageable)
     
    userProfile(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
     
    userSettings(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ForumViewController

      public ForumViewController()
  • Method Details

    • addAttributes

      @ModelAttribute public void addAttributes(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
    • index

      @GetMapping({"","/"}) public String index()
    • category

      @GetMapping("/category/{categoryId}") public String category(@PathVariable Long categoryId, org.springframework.ui.Model model, @PageableDefault(size=10,sort="createdAt",direction=DESC) org.springframework.data.domain.Pageable pageable)
    • post

      @GetMapping("/posts/{postId}") public String post(@PathVariable Long postId, org.springframework.ui.Model model, @PageableDefault(size=20,sort="createdAt",direction=ASC) org.springframework.data.domain.Pageable pageable)
    • createPost

      @GetMapping("/posts/create") public String createPost(@RequestParam(required=false) Long categoryId, org.springframework.ui.Model model)
    • editPost

      @GetMapping("/posts/{postId}/edit") public String editPost(@PathVariable Long postId, org.springframework.ui.Model model)
    • search

      @GetMapping("/search") public String search(@RequestParam String keyword, org.springframework.ui.Model model, @PageableDefault(size=10,sort="createdAt",direction=DESC) org.springframework.data.domain.Pageable pageable)
    • userPosts

      @GetMapping("/user/posts") public String userPosts(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, @PageableDefault(size=10,sort="createdAt",direction=DESC) org.springframework.data.domain.Pageable pageable)
    • userComments

      @GetMapping("/user/comments") public String userComments(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, @PageableDefault(size=20,sort="createdAt",direction=DESC) org.springframework.data.domain.Pageable pageable)
    • userProfile

      @GetMapping("/user/profile") public String userProfile(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
    • userSettings

      @GetMapping("/user/settings") public String userSettings(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model)
    • userLikes

      @GetMapping("/user/likes") public String userLikes(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.ui.Model model, @PageableDefault(size=20,sort="createdAt",direction=DESC) org.springframework.data.domain.Pageable pageable)