@Configuration public class SpringDataSource extends Object
构造器和说明 |
---|
SpringDataSource() |
限定符和类型 | 方法和说明 |
---|---|
com.mchange.v2.c3p0.ComboPooledDataSource |
comboPooledDataSource()
MyBatis 数据连接地址池配置
|
static org.mybatis.spring.mapper.MapperScannerConfigurer |
mapperScannerConfigurer() |
org.mybatis.spring.SqlSessionFactoryBean |
sqlSessionFactoryBean(com.mchange.v2.c3p0.ComboPooledDataSource comboPooledDataSource)
MyBatis配置 :配置sqlSessionFactory
|
@Bean(name="comboPooledDataSource", destroyMethod="close") public com.mchange.v2.c3p0.ComboPooledDataSource comboPooledDataSource() throws SQLException
SQLException
@Bean(value="sqlSessionFactoryBean") public org.mybatis.spring.SqlSessionFactoryBean sqlSessionFactoryBean(com.mchange.v2.c3p0.ComboPooledDataSource comboPooledDataSource) throws Exception
Exception
@Bean public static org.mybatis.spring.mapper.MapperScannerConfigurer mapperScannerConfigurer()
Copyright © 2019. All rights reserved.