Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.digitalsanctuary.spring.user.audit;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import lombok.RequiredArgsConstructor;
Expand All @@ -13,7 +13,7 @@
@Slf4j
@Component
@RequiredArgsConstructor
@ConditionalOnProperty(name = "user.audit.flushOnWrite", havingValue = "false")
@ConditionalOnExpression("${user.audit.logEvents:true} && !${user.audit.flushOnWrite:true}")
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for user.audit.flushOnWrite is set to true in the expression, which means the scheduler will be disabled unless explicitly overridden. Consider revisiting the default values to ensure they align with the intended enablement behavior from the original configuration.

Suggested change
@ConditionalOnExpression("${user.audit.logEvents:true} && !${user.audit.flushOnWrite:true}")
@ConditionalOnExpression("${user.audit.logEvents:true} && !${user.audit.flushOnWrite:false}")

Copilot uses AI. Check for mistakes.
public class FileAuditLogFlushScheduler {

/**
Expand Down