public class SharedDataSourceSpringBootstrap extends SpringBootstrap
DataSource from main ApplicationContext,
so plugin could use the same database as app and share database connection resource,
e.g. connection pool, transaction, etc.
Note that related AutoConfigurations have to be excluded explicitly to avoid
duplicated resource retaining.SpringBootstrap.ExcludeConfigurationsBEAN_IMPORTED_BEAN_NAMES, BEAN_PLUGIN, DEFAULT_EXCLUDE_APPLICATION_LISTENERS, DEFAULT_EXCLUDE_CONFIGURATIONS| Constructor and Description |
|---|
SharedDataSourceSpringBootstrap(SpringBootPlugin plugin,
java.lang.Class<?>... primarySources) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.context.ConfigurableApplicationContext |
createApplicationContext() |
protected java.lang.String[] |
getExcludeConfigurations()
Override this methods to customize excluded spring boot configuration
|
addPresetProperty, afterRefresh, bindToSpringApplication, configurePropertySources, getExcludeApplicationListeners, importBean, importBean, importBean, importBean, importBeanFromDependentPlugin, importBeanFromDependentPlugin, importBeanFromMainContext, importBeanFromMainContext, setListenersaddInitializers, addListeners, addPrimarySources, applyInitializers, configureEnvironment, configureProfiles, createBeanDefinitionLoader, exit, getAllSources, getApplicationLog, getClassLoader, getInitializers, getListeners, getMainApplicationClass, getResourceLoader, getSources, getWebApplicationType, load, logStartupInfo, logStartupProfileInfo, main, postProcessApplicationContext, refresh, registerLoggedException, run, run, run, setAddCommandLineProperties, setAddConversionService, setAdditionalProfiles, setAllowBeanDefinitionOverriding, setApplicationContextClass, setBanner, setBannerMode, setBeanNameGenerator, setDefaultProperties, setDefaultProperties, setEnvironment, setHeadless, setInitializers, setLazyInitialization, setLogStartupInfo, setMainApplicationClass, setRegisterShutdownHook, setResourceLoader, setSources, setWebApplicationTypepublic SharedDataSourceSpringBootstrap(SpringBootPlugin plugin, java.lang.Class<?>... primarySources)
protected java.lang.String[] getExcludeConfigurations()
SpringBootstrapgetExcludeConfigurations in class SpringBootstrappublic org.springframework.context.ConfigurableApplicationContext createApplicationContext()
createApplicationContext in class SpringBootstrap