remove connection pooling
This commit is contained in:
parent
697c349f29
commit
c1566e5851
|
@ -8,7 +8,6 @@
|
||||||
<properties>
|
<properties>
|
||||||
<org.jooq.version>3.7.3</org.jooq.version>
|
<org.jooq.version>3.7.3</org.jooq.version>
|
||||||
<com.h2database.version>1.4.191</com.h2database.version>
|
<com.h2database.version>1.4.191</com.h2database.version>
|
||||||
<com.zaxxer.HikariCP.version>2.4.4</com.zaxxer.HikariCP.version>
|
|
||||||
<org.springframework.version>4.2.5.RELEASE</org.springframework.version>
|
<org.springframework.version>4.2.5.RELEASE</org.springframework.version>
|
||||||
<org.slf4j.version>1.7.18</org.slf4j.version>
|
<org.slf4j.version>1.7.18</org.slf4j.version>
|
||||||
<ch.qos.logback.version>1.1.3</ch.qos.logback.version>
|
<ch.qos.logback.version>1.1.3</ch.qos.logback.version>
|
||||||
|
@ -29,11 +28,6 @@
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>${com.h2database.version}</version>
|
<version>${com.h2database.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.zaxxer</groupId>
|
|
||||||
<artifactId>HikariCP</artifactId>
|
|
||||||
<version>${com.zaxxer.HikariCP.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package com.baeldung.jooq.introduction;
|
package com.baeldung.jooq.introduction;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import com.zaxxer.hikari.HikariDataSource;
|
import org.h2.jdbcx.JdbcDataSource;
|
||||||
|
|
||||||
import org.jooq.SQLDialect;
|
import org.jooq.SQLDialect;
|
||||||
import org.jooq.impl.DataSourceConnectionProvider;
|
import org.jooq.impl.DataSourceConnectionProvider;
|
||||||
import org.jooq.impl.DefaultConfiguration;
|
import org.jooq.impl.DefaultConfiguration;
|
||||||
import org.jooq.impl.DefaultDSLContext;
|
import org.jooq.impl.DefaultDSLContext;
|
||||||
import org.jooq.impl.DefaultExecuteListenerProvider;
|
import org.jooq.impl.DefaultExecuteListenerProvider;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
@ -29,11 +27,10 @@ public class PersistenceContext {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public DataSource dataSource() {
|
public DataSource dataSource() {
|
||||||
HikariDataSource dataSource = new HikariDataSource();
|
JdbcDataSource dataSource = new JdbcDataSource();
|
||||||
|
|
||||||
dataSource.setDriverClassName(environment.getRequiredProperty("db.driver"));
|
dataSource.setUrl(environment.getRequiredProperty("db.url"));
|
||||||
dataSource.setJdbcUrl(environment.getRequiredProperty("db.url"));
|
dataSource.setUser(environment.getRequiredProperty("db.username"));
|
||||||
dataSource.setUsername(environment.getRequiredProperty("db.username"));
|
|
||||||
dataSource.setPassword(environment.getRequiredProperty("db.password"));
|
dataSource.setPassword(environment.getRequiredProperty("db.password"));
|
||||||
|
|
||||||
return dataSource;
|
return dataSource;
|
||||||
|
|
Loading…
Reference in New Issue