-
Notifications
You must be signed in to change notification settings - Fork 192
AuditorAware and DateTimeProvider regression [DATACOUCH-647] #958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Michael Reiche commented Hi Eduard Dudar - can you provide your application or a link to your repository? Mike |
Eduard Dudar commented Michael Reiche I can't provide what this ticket reported against because closed source but it fails exactly the same way on pretty much an empty, from scratch project like https://github.com/edudar/datacouch-647 |
In the prior version where you did not get an error, the reason is that the default for the bean name was empty
It has been change to be non-empty.
=============================================================== The bean annotation must have a name attribute that matches, or if it does not have a name attribute, then the method name must match. `package app; import org.springframework.boot.SpringApplication; import java.util.Optional; @SpringBootApplication
}` |
@mikereiche That's not something I do recall. I've been using |
I tried without setting the attribute in the annotation and it works as you said it did/does. I'll update my earlier comment. |
Eduard Dudar opened DATACOUCH-647 and commented
My application uses auditing but only for dates via
@CreatedDate
and@LastModifiedDate
. I don't usexxxBy
annotations.With Spring Boot 2.2.x and Spring Data Couchbase 3.x, everything starts and works as expected. Even though documentation says that there must be
AuditorAware<T>
bean.AuditingHandler
usesOptional
for auditor so this requirement does not seem to be true even in 3.x version.Now with Spring Boot 2.3 and Spring Data Couchbase 4.x, the said application does not start. First, it complains that
AuditorAware
bean not found. When I define one, it still complains that a bean named exactlyauditorAwareRef
is not found. I don't see anywhere in the documentation such naming requirement. Second, after definingauditorAwareRef
, it complains thatdataTimeProviderRef
is missing. And similar to the auditor, a bean has to be named exactly. This part is not in the doc at all.I feel like this is rather a regression, both beans should no be required for an application to start: the auditor is
Optional
and the datatimeprovider defaults toCurrentDateTimeProvider.INSTANCE
No further details from DATACOUCH-647
The text was updated successfully, but these errors were encountered: