Package dev.dbos.transact.spring
Interface DBOSConfigCustomizer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback for customizing a
DBOSConfig built from dbos.* application properties.
Declare one or more @Bean instances of this type to modify the auto-configured DBOSConfig without replacing it entirely. Customizers are applied in Order order after all properties have been bound.
Example — register a queue and override the executor ID at startup:
@Bean
DBOSConfigCustomizer myCustomizer(MyQueue queue) {
return config -> config
.withListenQueue(queue.name())
.withExecutorId("worker-1");
}
-
Method Summary
Modifier and TypeMethodDescriptiondev.dbos.transact.config.DBOSConfigcustomize(dev.dbos.transact.config.DBOSConfig config) Customize the givenDBOSConfigand return the (possibly new) instance.
-
Method Details
-
customize
dev.dbos.transact.config.DBOSConfig customize(dev.dbos.transact.config.DBOSConfig config) Customize the givenDBOSConfigand return the (possibly new) instance.- Parameters:
config- the config built from application properties; nevernull- Returns:
- the customized config; must not be
null
-