Package com.bytedesk.forum.controller
Class ForumViewController
java.lang.Object
com.bytedesk.forum.controller.ForumViewController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CategoryRepository
private String
private Boolean
private String
private String
private ForumUserService
private PostService
private Boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) index
(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)
-
Field Details
-
showDemo
-
customEnabled
-
customName
-
customLogo
-
customDescription
@Value("${bytedesk.custom.description:\u91cd\u590d\u5de5\u4f5c\u81ea\u52a8\u5316}") private String customDescription -
postService
-
categoryRepository
-
forumUserService
-
-
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
-
category
-
post
-
createPost
-
editPost
-
search
-
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)
-