-
Notifications
You must be signed in to change notification settings - Fork 167
Open
Labels
meta: waiting for feedbackWaiting for feedback of the original reporterWaiting for feedback of the original reporter
Description
Looks like EnablePersistentDomainEvents will select EventPublicationConfiguration for import and at the same time EventPublicationAutoConfiguration extends EventPublicationConfiguration so if you add EnablePersistentDomainEvents annotation then the application fails to start
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'eventPublicationRegistry', defined in class path resource [org/springframework/modulith/events/config/EventPublicationAutoConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/modulith/events/config/EventPublicationConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
Workaround for now seems to be to either enable overriding or just not using the annotation and manually importing your EventPublicationConfigurationExtension and EventSerializationConfigurationExtension implementations.
Metadata
Metadata
Assignees
Labels
meta: waiting for feedbackWaiting for feedback of the original reporterWaiting for feedback of the original reporter