How to launch spring boot application with cloud-bus via custom auto-configuration?

296 views Asked by At

Some time ago I found out that my spring-boot application had been launching slowly via @EnableAutoConfiguration. Then I decided to create custom configuration to speed up a process. I tried to @Import all needed configurations and I faced with issue of unknown beans:

Description:

Parameter 0 of method streamBusBridge in org.springframework.cloud.bus.BusStreamAutoConfiguration required a bean of type 'org.springframework.cloud.stream.function.StreamBridge' that could not be found.


Action:

Consider defining a bean of type 'org.springframework.cloud.stream.function.StreamBridge' in your configuration.

It seems that I've already used all cloud-bus configurations:

    PathServiceMatcherAutoConfiguration.class,
    BindingsEndpointAutoConfiguration.class,
    BusAutoConfiguration.class,
    BindingServiceConfiguration.class,
    BindersHealthIndicatorAutoConfiguration.class,
    ChannelsEndpointAutoConfiguration.class,
    BusRefreshAutoConfiguration.class,
    FunctionConfiguration.class,
    BusStreamAutoConfiguration.class,
    BusJacksonAutoConfiguration.class

What should I add to launch my application via custom auto-configuration?

Spring-boot: v2.6.6

Spring-cloud-bus: v3.1.2

Java: 17

0

There are 0 answers