SimbotSpringBootEventProviderAutoInstallBuildConfigure
自动配置当前可加载的所有 EventProvider 的配置类。
如果当前spring环境中存在任何额外的EventProviderFactory, 则使用这些 factory; 否则会直接使用 installAllEventProviders 来尝试加载环境中的所有可加载项。
For example custom factories:
Kotlin
@Configuration(proxyBeanMethods = false)
open class MyCustomFactoryConfiguration {
@Bean
fun fooFactory(): FooProvider.Factory {
return FooProvider
}
@Bean
fun barFactory(): BarFactory {
return BarFactory()
}
// ...
}
Content copied to clipboard
Java
@Configuration(proxyBeanMethods = false)
public class MyCustomFactoryConfiguration {
@Bean
public FooProvider.Factory fooFactory() {
return FooProvider.Factory;
}
@Bean
public BarFactory barFactory() {
return new BarFactory();
}
}
Content copied to clipboard
Author
ForteScarlet
Functions
Link copied to clipboard
@Bean