TSK-370: upgrade to Spring Boot 2.0.0.RELEASE

This commit is contained in:
Holger Hagen 2018-03-19 17:43:17 +01:00 committed by Martin Rojas Miguel Angel
parent ea7ab903d5
commit 034852cabd
4 changed files with 11 additions and 16 deletions

View File

@ -35,7 +35,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
@ -48,7 +47,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>
@ -143,7 +141,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version> <version>2.0.0.RELEASE</version>
<relativePath /> <relativePath />
</parent> </parent>

View File

@ -12,10 +12,10 @@ 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.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate; import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.annotation.DirtiesContext.ClassMode;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
@ -40,7 +40,8 @@ public class TransactionTest {
@Before @Before
public void init() throws SQLException, ClassNotFoundException { public void init() throws SQLException, ClassNotFoundException {
Class.forName("org.h2.Driver"); Class.forName("org.h2.Driver");
try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA", "SA")) { try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA",
"SA")) {
conn.createStatement().executeUpdate("DELETE FROM TASK WHERE 1=1"); conn.createStatement().executeUpdate("DELETE FROM TASK WHERE 1=1");
conn.commit(); conn.commit();
} }
@ -52,7 +53,8 @@ public class TransactionTest {
restTemplate.getForEntity("http://127.0.0.1:" + port + "/test", String.class); restTemplate.getForEntity("http://127.0.0.1:" + port + "/test", String.class);
int resultCount = 0; int resultCount = 0;
try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA", "SA")) { try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA",
"SA")) {
ResultSet rs = conn.createStatement().executeQuery("SELECT ID FROM TASK"); ResultSet rs = conn.createStatement().executeQuery("SELECT ID FROM TASK");
while (rs.next()) { while (rs.next()) {
@ -69,7 +71,8 @@ public class TransactionTest {
restTemplate.postForEntity("http://127.0.0.1:" + port + "/test", null, String.class); restTemplate.postForEntity("http://127.0.0.1:" + port + "/test", null, String.class);
int resultCount = 0; int resultCount = 0;
try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA", "SA")) { try (Connection conn = DriverManager.getConnection("jdbc:h2:mem:task-engine;IGNORECASE=TRUE;LOCK_MODE=0", "SA",
"SA")) {
ResultSet rs = conn.createStatement().executeQuery("SELECT ID FROM TASK"); ResultSet rs = conn.createStatement().executeQuery("SELECT ID FROM TASK");
while (rs.next()) { while (rs.next()) {

View File

@ -15,8 +15,8 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version> <version>2.0.0.RELEASE</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath/> <!-- lookup parent from repository -->
</parent> </parent>
<properties> <properties>

View File

@ -37,7 +37,7 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version> <version>2.0.0.RELEASE</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath /> <!-- lookup parent from repository -->
</parent> </parent>
@ -160,18 +160,15 @@
<dependency> <dependency>
<groupId>org.springframework.hateoas</groupId> <groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId> <artifactId>spring-hateoas</artifactId>
<version>0.24.0.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.plugin</groupId> <groupId>org.springframework.plugin</groupId>
<artifactId>spring-plugin-core</artifactId> <artifactId>spring-plugin-core</artifactId>
<version>1.2.0.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -208,7 +205,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration> <configuration>
<showWarnings>true</showWarnings> <showWarnings>true</showWarnings>
<compilerArgs> <compilerArgs>
@ -219,7 +215,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
@ -232,7 +227,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>