Skip to content

Commit

Permalink
GH-443 - Declare most concrete type for EventPublicationRegistry conf…
Browse files Browse the repository at this point in the history
…iguration.
  • Loading branch information
odrotbohm committed Jan 10, 2024
1 parent 88f65f1 commit 31dfa45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;
import org.springframework.modulith.events.config.EventPublicationAutoConfiguration.AsyncEnablingConfiguration;
import org.springframework.modulith.events.core.DefaultEventPublicationRegistry;
import org.springframework.modulith.events.core.EventPublicationRegistry;
import org.springframework.modulith.events.core.EventPublicationRepository;
import org.springframework.modulith.events.support.CompletionRegisteringAdvisor;
Expand All @@ -62,7 +63,7 @@ public class EventPublicationAutoConfiguration extends EventPublicationConfigura
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@ConditionalOnBean(EventPublicationRepository.class)
EventPublicationRegistry eventPublicationRegistry(EventPublicationRepository repository,
DefaultEventPublicationRegistry eventPublicationRegistry(EventPublicationRepository repository,
ObjectProvider<Clock> clock) {
return super.eventPublicationRegistry(repository, clock);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class EventPublicationConfiguration {

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
EventPublicationRegistry eventPublicationRegistry(EventPublicationRepository repository,
DefaultEventPublicationRegistry eventPublicationRegistry(EventPublicationRepository repository,
ObjectProvider<Clock> clock) {
return new DefaultEventPublicationRegistry(repository, clock.getIfAvailable(() -> Clock.systemUTC()));
}
Expand Down

0 comments on commit 31dfa45

Please sign in to comment.