Replaced tabs by spaces
This commit is contained in:
parent
74d4c4f72c
commit
88e27db6c5
|
@ -1,297 +1,297 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent-modules</artifactId>
|
<artifactId>parent-modules</artifactId>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>libraries</artifactId>
|
<artifactId>libraries</artifactId>
|
||||||
<name>libraries</name>
|
<name>libraries</name>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<type>maven-plugin</type>
|
<type>maven-plugin</type>
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.serenity-bdd.maven.plugins</groupId>
|
<groupId>net.serenity-bdd.maven.plugins</groupId>
|
||||||
<artifactId>serenity-maven-plugin</artifactId>
|
<artifactId>serenity-maven-plugin</artifactId>
|
||||||
<version>${serenity.plugin.version}</version>
|
<version>${serenity.plugin.version}</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>serenity-reports</id>
|
<id>serenity-reports</id>
|
||||||
<phase>post-integration-test</phase>
|
<phase>post-integration-test</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>aggregate</goal>
|
<goal>aggregate</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- JDO Plugin -->
|
<!-- JDO Plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-maven-plugin</artifactId>
|
<artifactId>datanucleus-maven-plugin</artifactId>
|
||||||
<version>5.0.2</version>
|
<version>5.0.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<api>JDO</api>
|
<api>JDO</api>
|
||||||
<props>${basedir}/datanucleus.properties</props>
|
<props>${basedir}/datanucleus.properties</props>
|
||||||
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
|
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
|
||||||
<verbose>true</verbose>
|
<verbose>true</verbose>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>process-classes</phase>
|
<phase>process-classes</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>enhance</goal>
|
<goal>enhance</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- https://mvnrepository.com/artifact/cglib/cglib -->
|
<!-- https://mvnrepository.com/artifact/cglib/cglib -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cglib</groupId>
|
<groupId>cglib</groupId>
|
||||||
<artifactId>cglib</artifactId>
|
<artifactId>cglib</artifactId>
|
||||||
<version>${cglib.version}</version>
|
<version>${cglib.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
<version>${commons-lang.version}</version>
|
<version>${commons-lang.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jasypt</groupId>
|
<groupId>org.jasypt</groupId>
|
||||||
<artifactId>jasypt</artifactId>
|
<artifactId>jasypt</artifactId>
|
||||||
<version>${jasypt.version}</version>
|
<version>${jasypt.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.javatuples</groupId>
|
<groupId>org.javatuples</groupId>
|
||||||
<artifactId>javatuples</artifactId>
|
<artifactId>javatuples</artifactId>
|
||||||
<version>${javatuples.version}</version>
|
<version>${javatuples.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.javassist</groupId>
|
<groupId>org.javassist</groupId>
|
||||||
<artifactId>javassist</artifactId>
|
<artifactId>javassist</artifactId>
|
||||||
<version>${javaassist.version}</version>
|
<version>${javaassist.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
|
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.assertj</groupId>
|
<groupId>org.assertj</groupId>
|
||||||
<artifactId>assertj-core</artifactId>
|
<artifactId>assertj-core</artifactId>
|
||||||
<version>${assertj.version}</version>
|
<version>${assertj.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.skyscreamer</groupId>
|
<groupId>org.skyscreamer</groupId>
|
||||||
<artifactId>jsonassert</artifactId>
|
<artifactId>jsonassert</artifactId>
|
||||||
<version>${jsonassert.version}</version>
|
<version>${jsonassert.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.javers</groupId>
|
<groupId>org.javers</groupId>
|
||||||
<artifactId>javers-core</artifactId>
|
<artifactId>javers-core</artifactId>
|
||||||
<version>${javers.version}</version>
|
<version>${javers.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-server</artifactId>
|
<artifactId>jetty-server</artifactId>
|
||||||
<version>${jetty.version}</version>
|
<version>${jetty.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-servlet</artifactId>
|
<artifactId>jetty-servlet</artifactId>
|
||||||
<version>${jetty.version}</version>
|
<version>${jetty.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
<version>${httpclient.version}</version>
|
<version>${httpclient.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
<artifactId>commons-io</artifactId>
|
<artifactId>commons-io</artifactId>
|
||||||
<version>${commons.io.version}</version>
|
<version>${commons.io.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.flink</groupId>
|
<groupId>org.apache.flink</groupId>
|
||||||
<artifactId>flink-core</artifactId>
|
<artifactId>flink-core</artifactId>
|
||||||
<version>${flink.version}</version>
|
<version>${flink.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.flink</groupId>
|
<groupId>org.apache.flink</groupId>
|
||||||
<artifactId>flink-java</artifactId>
|
<artifactId>flink-java</artifactId>
|
||||||
<version>${flink.version}</version>
|
<version>${flink.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<artifactId>commons-logging</artifactId>
|
<artifactId>commons-logging</artifactId>
|
||||||
<groupId>commons-logging</groupId>
|
<groupId>commons-logging</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.flink</groupId>
|
<groupId>org.apache.flink</groupId>
|
||||||
<artifactId>flink-test-utils_2.10</artifactId>
|
<artifactId>flink-test-utils_2.10</artifactId>
|
||||||
<version>${flink.version}</version>
|
<version>${flink.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-math3</artifactId>
|
<artifactId>commons-math3</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-core</artifactId>
|
<artifactId>serenity-core</artifactId>
|
||||||
<version>${serenity.version}</version>
|
<version>${serenity.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-junit</artifactId>
|
<artifactId>serenity-junit</artifactId>
|
||||||
<version>${serenity.version}</version>
|
<version>${serenity.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-jbehave</artifactId>
|
<artifactId>serenity-jbehave</artifactId>
|
||||||
<version>${serenity.jbehave.version}</version>
|
<version>${serenity.jbehave.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-rest-assured</artifactId>
|
<artifactId>serenity-rest-assured</artifactId>
|
||||||
<version>${serenity.version}</version>
|
<version>${serenity.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-jira-requirements-provider</artifactId>
|
<artifactId>serenity-jira-requirements-provider</artifactId>
|
||||||
<version>${serenity.jira.version}</version>
|
<version>${serenity.jira.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-databind</artifactId>
|
<artifactId>jackson-databind</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>${jackson.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- JDO -->
|
<!-- JDO -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>javax.jdo</artifactId>
|
<artifactId>javax.jdo</artifactId>
|
||||||
<version>3.2.0-m6</version>
|
<version>3.2.0-m6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-core</artifactId>
|
<artifactId>datanucleus-core</artifactId>
|
||||||
<version>5.1.0-m1</version>
|
<version>5.1.0-m1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-api-jdo</artifactId>
|
<artifactId>datanucleus-api-jdo</artifactId>
|
||||||
<version>5.1.0-m1</version>
|
<version>5.1.0-m1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-rdbms</artifactId>
|
<artifactId>datanucleus-rdbms</artifactId>
|
||||||
<version>5.1.0-m1</version>
|
<version>5.1.0-m1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-maven-plugin</artifactId>
|
<artifactId>datanucleus-maven-plugin</artifactId>
|
||||||
<version>5.0.2</version>
|
<version>5.0.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>1.4.194</version>
|
<version>1.4.194</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.datanucleus</groupId>
|
<groupId>org.datanucleus</groupId>
|
||||||
<artifactId>datanucleus-xml</artifactId>
|
<artifactId>datanucleus-xml</artifactId>
|
||||||
<version>5.0.0-release</version>
|
<version>5.0.0-release</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
<version>4.3.8.RELEASE</version>
|
<version>4.3.8.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.serenity-bdd</groupId>
|
<groupId>net.serenity-bdd</groupId>
|
||||||
<artifactId>serenity-spring</artifactId>
|
<artifactId>serenity-spring</artifactId>
|
||||||
<version>${serenity.version}</version>
|
<version>${serenity.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.rest-assured</groupId>
|
<groupId>io.rest-assured</groupId>
|
||||||
<artifactId>spring-mock-mvc</artifactId>
|
<artifactId>spring-mock-mvc</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.0.3</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.multiverse</groupId>
|
<groupId>org.multiverse</groupId>
|
||||||
<artifactId>multiverse-core</artifactId>
|
<artifactId>multiverse-core</artifactId>
|
||||||
<version>${multiverse.version}</version>
|
<version>${multiverse.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zaxxer</groupId>
|
<groupId>com.zaxxer</groupId>
|
||||||
<artifactId>HikariCP</artifactId>
|
<artifactId>HikariCP</artifactId>
|
||||||
<version>2.6.1</version>
|
<version>2.6.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.h2database</groupId>
|
<groupId>com.h2database</groupId>
|
||||||
<artifactId>h2</artifactId>
|
<artifactId>h2</artifactId>
|
||||||
<version>1.4.195</version>
|
<version>1.4.195</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<multiverse.version>0.7.0</multiverse.version>
|
<multiverse.version>0.7.0</multiverse.version>
|
||||||
<cglib.version>3.2.4</cglib.version>
|
<cglib.version>3.2.4</cglib.version>
|
||||||
<commons-lang.version>3.5</commons-lang.version>
|
<commons-lang.version>3.5</commons-lang.version>
|
||||||
<jasypt.version>1.9.2</jasypt.version>
|
<jasypt.version>1.9.2</jasypt.version>
|
||||||
<javatuples.version>1.2</javatuples.version>
|
<javatuples.version>1.2</javatuples.version>
|
||||||
<javaassist.version>3.21.0-GA</javaassist.version>
|
<javaassist.version>3.21.0-GA</javaassist.version>
|
||||||
<assertj.version>3.6.2</assertj.version>
|
<assertj.version>3.6.2</assertj.version>
|
||||||
<jsonassert.version>1.5.0</jsonassert.version>
|
<jsonassert.version>1.5.0</jsonassert.version>
|
||||||
<javers.version>3.1.0</javers.version>
|
<javers.version>3.1.0</javers.version>
|
||||||
<jetty.version>9.4.3.v20170317</jetty.version>
|
<jetty.version>9.4.3.v20170317</jetty.version>
|
||||||
<httpclient.version>4.5.3</httpclient.version>
|
<httpclient.version>4.5.3</httpclient.version>
|
||||||
<commons.io.version>2.5</commons.io.version>
|
<commons.io.version>2.5</commons.io.version>
|
||||||
<jetty.version>9.4.2.v20170220</jetty.version>
|
<jetty.version>9.4.2.v20170220</jetty.version>
|
||||||
<httpclient.version>4.5.3</httpclient.version>
|
<httpclient.version>4.5.3</httpclient.version>
|
||||||
<commons.io.version>2.5</commons.io.version>
|
<commons.io.version>2.5</commons.io.version>
|
||||||
<flink.version>1.2.0</flink.version>
|
<flink.version>1.2.0</flink.version>
|
||||||
<jackson.version>2.8.5</jackson.version>
|
<jackson.version>2.8.5</jackson.version>
|
||||||
<serenity.version>1.4.0</serenity.version>
|
<serenity.version>1.4.0</serenity.version>
|
||||||
<serenity.jbehave.version>1.24.0</serenity.jbehave.version>
|
<serenity.jbehave.version>1.24.0</serenity.jbehave.version>
|
||||||
<serenity.jira.version>1.1.3-rc.5</serenity.jira.version>
|
<serenity.jira.version>1.1.3-rc.5</serenity.jira.version>
|
||||||
<serenity.plugin.version>1.4.0</serenity.plugin.version>
|
<serenity.plugin.version>1.4.0</serenity.plugin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -10,36 +10,36 @@ import com.zaxxer.hikari.HikariDataSource;
|
||||||
|
|
||||||
public class DataSource {
|
public class DataSource {
|
||||||
|
|
||||||
private static HikariConfig config = new HikariConfig();
|
private static HikariConfig config = new HikariConfig();
|
||||||
private static HikariDataSource ds;
|
private static HikariDataSource ds;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// config = new HikariConfig("datasource.properties");
|
// config = new HikariConfig("datasource.properties");
|
||||||
|
|
||||||
// Properties props = new Properties();
|
// Properties props = new Properties();
|
||||||
// props.setProperty("dataSourceClassName", "org.h2.Driver");
|
// props.setProperty("dataSourceClassName", "org.h2.Driver");
|
||||||
// props.setProperty("dataSource.user", "");
|
// props.setProperty("dataSource.user", "");
|
||||||
// props.setProperty("dataSource.password", "");
|
// props.setProperty("dataSource.password", "");
|
||||||
// props.put("dataSource.logWriter", new PrintWriter(System.out));
|
// props.put("dataSource.logWriter", new PrintWriter(System.out));
|
||||||
// config = new HikariConfig(props);
|
// config = new HikariConfig(props);
|
||||||
|
|
||||||
config.setJdbcUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;INIT=runscript from 'classpath:/db.sql'");
|
config.setJdbcUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;INIT=runscript from 'classpath:/db.sql'");
|
||||||
config.setUsername("");
|
config.setUsername("");
|
||||||
config.setPassword("");
|
config.setPassword("");
|
||||||
config.addDataSourceProperty("cachePrepStmts", "true");
|
config.addDataSourceProperty("cachePrepStmts", "true");
|
||||||
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
config.addDataSourceProperty("prepStmtCacheSize", "250");
|
||||||
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
|
||||||
ds = new HikariDataSource(config);
|
ds = new HikariDataSource(config);
|
||||||
|
|
||||||
// ds.setJdbcUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;INIT=runscript from 'classpath:/db.sql'");
|
// ds.setJdbcUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;INIT=runscript from 'classpath:/db.sql'");
|
||||||
// ds.setUsername("");
|
// ds.setUsername("");
|
||||||
// ds.setPassword("");
|
// ds.setPassword("");
|
||||||
}
|
}
|
||||||
|
|
||||||
private DataSource() {}
|
private DataSource() {}
|
||||||
|
|
||||||
public static Connection getConnection() throws SQLException {
|
public static Connection getConnection() throws SQLException {
|
||||||
return ds.getConnection();
|
return ds.getConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,34 +9,34 @@ import java.util.List;
|
||||||
|
|
||||||
public class HikariCPDemo {
|
public class HikariCPDemo {
|
||||||
|
|
||||||
public static List<Employee> fetchData() {
|
public static List<Employee> fetchData() {
|
||||||
final String SQL_QUERY = "select * from emp";
|
final String SQL_QUERY = "select * from emp";
|
||||||
List<Employee> employees = null;
|
List<Employee> employees = null;
|
||||||
try (Connection con = DataSource.getConnection();
|
try (Connection con = DataSource.getConnection();
|
||||||
PreparedStatement pst = con.prepareStatement(SQL_QUERY);
|
PreparedStatement pst = con.prepareStatement(SQL_QUERY);
|
||||||
ResultSet rs = pst.executeQuery();) {
|
ResultSet rs = pst.executeQuery();) {
|
||||||
employees = new ArrayList<Employee>();
|
employees = new ArrayList<Employee>();
|
||||||
Employee employee;
|
Employee employee;
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
employee = new Employee();
|
employee = new Employee();
|
||||||
employee.setEmpNo(rs.getInt("empno"));
|
employee.setEmpNo(rs.getInt("empno"));
|
||||||
employee.setEname(rs.getString("ename"));
|
employee.setEname(rs.getString("ename"));
|
||||||
employee.setJob(rs.getString("job"));
|
employee.setJob(rs.getString("job"));
|
||||||
employee.setMgr(rs.getInt("mgr"));
|
employee.setMgr(rs.getInt("mgr"));
|
||||||
employee.setHiredate(rs.getDate("hiredate"));
|
employee.setHiredate(rs.getDate("hiredate"));
|
||||||
employee.setSal(rs.getInt("sal"));
|
employee.setSal(rs.getInt("sal"));
|
||||||
employee.setComm(rs.getInt("comm"));
|
employee.setComm(rs.getInt("comm"));
|
||||||
employee.setDeptno(rs.getInt("deptno"));
|
employee.setDeptno(rs.getInt("deptno"));
|
||||||
employees.add(employee);
|
employees.add(employee);
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return employees;
|
return employees;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
fetchData();
|
fetchData();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@ import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class HikariCPUnitTest {
|
public class HikariCPUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenConnection_thenFetchDbData() {
|
public void givenConnection_thenFetchDbData() {
|
||||||
List<Employee> employees = HikariCPDemo.fetchData();
|
List<Employee> employees = HikariCPDemo.fetchData();
|
||||||
assertEquals(4, employees.size());
|
assertEquals(4, employees.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue