upgrade and cleanup

This commit is contained in:
DOHA 2016-12-07 14:19:40 +02:00
parent d564cd3d8d
commit 0ceb6db1e5
2 changed files with 29 additions and 22 deletions

View File

@ -11,7 +11,7 @@
<!-- Import dependency management from Spring Boot --> <!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId> <artifactId>spring-boot-dependencies</artifactId>
<version>1.3.5.RELEASE</version> <version>1.4.2.RELEASE</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
@ -23,14 +23,12 @@
<dependency> <dependency>
<groupId>org.jooq</groupId> <groupId>org.jooq</groupId>
<artifactId>jooq</artifactId> <artifactId>jooq</artifactId>
<version>${org.jooq.version}</version>
</dependency> </dependency>
<!-- Database Access --> <!-- Database Access -->
<dependency> <dependency>
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<version>${com.h2database.version}</version>
</dependency> </dependency>
<!-- Spring --> <!-- Spring -->
@ -70,6 +68,11 @@
<artifactId>spring-test</artifactId> <artifactId>spring-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -77,7 +80,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId> <artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version> <version>${properties-maven-plugin.version}</version>
<executions> <executions>
<execution> <execution>
<phase>initialize</phase> <phase>initialize</phase>
@ -96,7 +99,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId> <artifactId>sql-maven-plugin</artifactId>
<version>1.5</version> <version>${sql-maven-plugin.version}</version>
<executions> <executions>
<execution> <execution>
<phase>initialize</phase> <phase>initialize</phase>
@ -179,7 +182,7 @@
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version> <version>${lifecycle-mapping.version}</version>
<configuration> <configuration>
<lifecycleMappingMetadata> <lifecycleMappingMetadata>
<pluginExecutions> <pluginExecutions>
@ -244,15 +247,19 @@
</profiles> </profiles>
<properties> <properties>
<org.jooq.version>3.7.3</org.jooq.version> <org.jooq.version>3.8.6</org.jooq.version>
<com.h2database.version>1.4.191</com.h2database.version> <com.h2database.version>1.4.193</com.h2database.version>
<org.springframework.version>4.2.5.RELEASE</org.springframework.version> <org.springframework.version>4.3.4.RELEASE</org.springframework.version>
<org.slf4j.version>1.7.18</org.slf4j.version> <org.slf4j.version>1.7.21</org.slf4j.version>
<ch.qos.logback.version>1.1.3</ch.qos.logback.version> <ch.qos.logback.version>1.1.7</ch.qos.logback.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version> <maven-surefire-plugin.version>2.19.1</maven-surefire-plugin.version>
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
<sql-maven-plugin.version>1.5</sql-maven-plugin.version>
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
</properties> </properties>
</project> </project>

View File

@ -1,5 +1,10 @@
package com.baeldung.jooq.springboot; package com.baeldung.jooq.springboot;
import static com.baeldung.jooq.introduction.db.public_.tables.Author.AUTHOR;
import static com.baeldung.jooq.introduction.db.public_.tables.AuthorBook.AUTHOR_BOOK;
import static com.baeldung.jooq.introduction.db.public_.tables.Book.BOOK;
import static org.junit.Assert.assertEquals;
import org.jooq.DSLContext; import org.jooq.DSLContext;
import org.jooq.Record3; import org.jooq.Record3;
import org.jooq.Result; import org.jooq.Result;
@ -7,19 +12,14 @@ import org.jooq.impl.DSL;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import static com.baeldung.jooq.introduction.db.public_.tables.Author.AUTHOR; @RunWith(SpringRunner.class)
import static com.baeldung.jooq.introduction.db.public_.tables.AuthorBook.AUTHOR_BOOK; @SpringBootTest(classes = Application.class)
import static com.baeldung.jooq.introduction.db.public_.tables.Book.BOOK;
import static org.junit.Assert.assertEquals;
@SpringApplicationConfiguration(Application.class)
@Transactional("transactionManager") @Transactional("transactionManager")
@RunWith(SpringJUnit4ClassRunner.class)
public class SpringBootIntegrationTest { public class SpringBootIntegrationTest {
@Autowired @Autowired