Skip to content

Conversation

@ghgh415263
Copy link
Contributor

use autowired properties for AuditorAware and DateTimeProvider when explicit references are not provided

See: #3177

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 21, 2025
@mp911de
Copy link
Member

mp911de commented Oct 22, 2025

We could certainly enable autowiring for dateTimeProvider, however, this PR is incomplete as it is missing tests and it breaks applications that do not declare an AuditorAware bean.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Oct 22, 2025
@ghgh415263
Copy link
Contributor Author

ghgh415263 commented Oct 22, 2025

Thank you for the feedback.

  1. unit tests are required for AuditingBeanDefinitionRegistrarSupport.java
  2. application( with @EnableJpaAudting) can start even if no AuditorAware bean is defined.

new PR covers the second requirement. I will add the unit tests soon.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Oct 22, 2025
@ghgh415263
Copy link
Contributor Author

ghgh415263 commented Oct 23, 2025

@mp911de I added unit tests.
I would appreciate any feedback if you notice any issues.

use autowired properties for AuditorAware and DateTimeProvider when explicit references are not provided

See: spring-projects#3177

Signed-off-by: JaeYeon Kim <[email protected]>
@mp911de mp911de self-assigned this Oct 27, 2025
mp911de pushed a commit that referenced this pull request Oct 28, 2025
Use autowired properties for AuditorAware and DateTimeProvider when explicit references are not provided

Closes: #3177
Original pull request: #3385

Signed-off-by: JaeYeon Kim <[email protected]>
mp911de added a commit that referenced this pull request Oct 28, 2025
Add autowriting support to auditing handler properties.

See: #3177
Original pull request: #3385
@mp911de mp911de added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Oct 28, 2025
@mp911de mp911de added this to the 4.0 RC2 (2025.1.0) milestone Oct 28, 2025
@mp911de
Copy link
Member

mp911de commented Oct 28, 2025

Thank you for your contribution. That's merged and polished now.

@mp911de mp911de closed this Oct 28, 2025
@mp911de mp911de linked an issue Oct 28, 2025 that may be closed by this pull request
mp911de added a commit that referenced this pull request Oct 28, 2025
Add autowriting support to auditing handler properties.

See: #3177
Original pull request: #3385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow overriding DateTimeProvider via Bean Definition

3 participants