spring-boot-starter-druid

本文介绍了如何在Spring Boot项目中配置并使用Druid数据库连接池。提供了详细的配置示例代码,展示了如何直接通过Spring Bean的方式初始化DruidDataSource。此外还提供了一些第三方的Spring Boot Starter模块,帮助开发者更便捷地集成Druid。

i have found from the document, and seems that spring-boot only support tomcat-jdbc,HikariCP and DBCP connection pool, if i want to use druid(https://github.com/alibaba/druid/wiki/FAQ) in my project with spring-boot, may i know how to do?

This kind of question is best asked on stackoverflow.com (use the spring-boot tag).

We don't currently offer any auto-configuration support for druid, but you should be able to configure directly as you would any other Spring Bean. Probably something like this:

@Bean
public DruidDataSource dataSource() {
    DruidDataSource ds = new DruidDataSource();
    ds.setUrl(...);
    ds.setUserName(...);
    ds.setPassword(...);
    // any other configuration
    return ds;
}

https://github.com/spring-projects/spring-boot/issues/2301

 

 

https://github.com/Lzw2016/druid-spring-boot-starter

https://github.com/CrazyApeDX/spring-boot-starter-druid

https://github.com/xubinux/spring-boot-starter-druid  gd

 

https://eacdy.gitbooks.io/spring-cloud-book/content/

 

https://github.com/zalando/spring-boot-etcd

 

转载于:https://www.cnblogs.com/softidea/p/6739558.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值