@ConditionalOnProperty(name="spring.datasource.dbs.enable",
havingValue="true")
@Configuration
@ConditionalOnClass(value={org.apache.ibatis.session.SqlSessionFactory.class,org.mybatis.spring.SqlSessionFactoryBean.class})
@EnableConfigurationProperties(value=org.mybatis.spring.boot.autoconfigure.MybatisProperties.class)
@AutoConfigureAfter(value=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class)
public class NewMybatisAutoConfiguration
extends java.lang.Object
构造器和说明 |
---|
NewMybatisAutoConfiguration(org.mybatis.spring.boot.autoconfigure.MybatisProperties properties,
org.springframework.beans.factory.ObjectProvider<org.apache.ibatis.plugin.Interceptor[]> interceptorsProvider,
org.springframework.core.io.ResourceLoader resourceLoader,
org.springframework.beans.factory.ObjectProvider<org.apache.ibatis.mapping.DatabaseIdProvider> databaseIdProvider,
org.springframework.beans.factory.ObjectProvider<java.util.List<org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer>> configurationCustomizersProvider) |
限定符和类型 | 方法和说明 |
---|---|
void |
checkConfigFileExists() |
org.apache.ibatis.session.SqlSessionFactory |
sqlSessionFactory(javax.sql.DataSource dataSource) |
org.mybatis.spring.SqlSessionTemplate |
sqlSessionTemplate(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory) |
public NewMybatisAutoConfiguration(org.mybatis.spring.boot.autoconfigure.MybatisProperties properties, org.springframework.beans.factory.ObjectProvider<org.apache.ibatis.plugin.Interceptor[]> interceptorsProvider, org.springframework.core.io.ResourceLoader resourceLoader, org.springframework.beans.factory.ObjectProvider<org.apache.ibatis.mapping.DatabaseIdProvider> databaseIdProvider, org.springframework.beans.factory.ObjectProvider<java.util.List<org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer>> configurationCustomizersProvider)
@PostConstruct public void checkConfigFileExists()
@Bean public org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory(@Qualifier(value="dynamicDataSource") javax.sql.DataSource dataSource) throws java.lang.Exception
java.lang.Exception
@Bean public org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)