Package su.onno.ui.comments
Class CommentsAutoConfiguration
java.lang.Object
su.onno.ui.comments.CommentsAutoConfiguration
@AutoConfiguration(after=UiAutoConfiguration.class)
@ConditionalOnWebApplication(type=SERVLET)
@ConditionalOnBean({MetadataRegistry.class,FieldHintResolver.class})
@EnableConfigurationProperties(CommentProperties.class)
@ConditionalOnProperty(prefix="onno.comments",
name="enabled",
havingValue="true",
matchIfMissing=true)
public class CommentsAutoConfiguration
extends Object
Wires the
/api/comments discussion-thread endpoint, its CommentService store, and
the onno.comments.* configuration. Gated on a servlet web app and onno.comments
.enabled (default true), and runs after UiAutoConfiguration so the UiAccessService
and CurrentUserResolver it builds on are already present. Comments are a UI-surface
feature whose beans hard-depend on the UI beans, so it also requires FieldHintResolver —
one of the beans UiAutoConfiguration only creates when onno.ui.enabled is true.
That keeps the context from failing to start when the UI is disabled but comments are left at
their default-on flag. Storage is the framework-owned onno_comments table the service
creates on startup — there is no app metadata to model.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncommentController(CommentService commentService, UiAccessService access, CurrentUserResolver currentUserResolver, CommentAuthorAvatars authorAvatars, CommentProperties properties, UiViewResolver viewResolver, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, MentionResolver mentionResolver, org.springframework.context.ApplicationEventPublisher events) commentService(org.jdbi.v3.core.Jdbi jdbi) mentionController(MetadataRegistry registry, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, UiAccessService access, CommentProperties properties, UiLayout uiLayout, MentionResolver mentionResolver) mentionResolver(MetadataRegistry registry, UiAccessService access, org.jdbi.v3.core.Jdbi jdbi)
-
Constructor Details
-
CommentsAutoConfiguration
public CommentsAutoConfiguration()
-
-
Method Details
-
commentService
-
mentionResolver
@Bean public MentionResolver mentionResolver(MetadataRegistry registry, UiAccessService access, org.jdbi.v3.core.Jdbi jdbi) -
mentionController
@Bean public MentionController mentionController(MetadataRegistry registry, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, UiAccessService access, CommentProperties properties, UiLayout uiLayout, MentionResolver mentionResolver) -
commentController
@Bean public CommentController commentController(CommentService commentService, UiAccessService access, CurrentUserResolver currentUserResolver, CommentAuthorAvatars authorAvatars, CommentProperties properties, UiViewResolver viewResolver, CatalogQueryService catalogQuery, DocumentQueryService documentQuery, MentionResolver mentionResolver, org.springframework.context.ApplicationEventPublisher events)
-