java - SpringBoot数据源注入问题
天蓬老师
天蓬老师 2017-04-18 09:49:34
0
1
586

在SpringBoot中配置Druid数据源,除了上面主数据源那五条配置可以直接注入进去,下面配置的属性能注入到DruidDataSource吗?

我搜去看了SpringBoot官方文档,对于特殊数据源都有其特定标签,比如

spring.datasource.tomcat.max-wait=10000

而Druid并不在其列,所以我认为并不会注入druid的那些配置

如果能回答更深,可以说一下SpringBoot数据源注入过程.

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
巴扎黑

If it is not supported by default, just write a configuration class yourself, take the parameters, and get the Bean of the DataSource

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!