本文共 982 字,大约阅读时间需要 3 分钟。
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() 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:
@Beanpublic 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
转载地址:http://tuuix.baihongyu.com/