Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can spring-boot support druid connection pool #2301

Closed
luffyke opened this issue Jan 7, 2015 · 1 comment
Closed

can spring-boot support druid connection pool #2301

luffyke opened this issue Jan 7, 2015 · 1 comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com

Comments

@luffyke
Copy link

luffyke commented Jan 7, 2015

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?

@philwebb
Copy link
Member

philwebb commented Jan 7, 2015

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;
}

@philwebb philwebb closed this as completed Jan 7, 2015
@philwebb philwebb added the for: stackoverflow A question that's better suited to stackoverflow.com label Jan 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stackoverflow A question that's better suited to stackoverflow.com
Projects
None yet
Development

No branches or pull requests

2 participants