SpringBoot 默认数据源

Springboot 默认使用org.apache.tomcat.jdbc.pool.DataSource数据源,默认配置如下:

org.apache.tomcat.jdbc.pool.DataSource@6cfd9a54{
	ConnectionPool[
		defaultAutoCommit=null; 
		defaultReadOnly=null; 
		defaultTransactionIsolation=-1; 
		defaultCatalog=null; 
		driverClassName=com.mysql.jdbc.Driver; 
		maxActive=100; 
		maxIdle=100; 
		minIdle=10; 
		initialSize=10; 
		maxWait=30000; 
		testOnBorrow=true; 
		testOnReturn=false; 
		timeBetweenEvictionRunsMillis=5000; 
		numTestsPerEvictionRun=0; 
		minEvictableIdleTimeMillis=60000; 
		testWhileIdle=false; 
		testOnConnect=false; 
		password=********; 
		url=jdbc:mysql://localhost:3306/test1; 
		username=root; 
		validationQuery=SELECT 1; 
		validationQueryTimeout=-1; 
		validatorClassName=null; 
		validationInterval=3000; 
		accessToUnderlyingConnectionAllowed=true; 
		removeAbandoned=false; 
		removeAbandonedTimeout=60; 
		logAbandoned=false; 
		connectionProperties=null; 
		initSQL=null; 
		jdbcInterceptors=null; 
		jmxEnabled=true; 
		fairQueue=true; 
		useEquals=true; 
		abandonWhenPercentageFull=0; 
		maxAge=0; 
		useLock=false; 
		dataSource=null; 
		dataSourceJNDI=null; 
		suspectTimeout=0; 
		alternateUsernameAllowed=false; 
		commitOnReturn=false; 
		rollbackOnReturn=false; 
		useDisposableConnectionFacade=true; 
		logValidationErrors=false; 
		propagateInterruptState=false; 
		ignoreExceptionOnPreLoad=false; 
}


你可能感兴趣的:(Springboot)