Skip to content

Commit 686ea0b

Browse files
committed
Upgrade to Spring Boot 2.2.5
This is primarily motivated by an upcoming dependency on HeaderResultMatchers::dateValue, which has a hard dependency on JUnit 4, fixed in v5.1.8 and v5.2.4 [1]. It was either reintroduce JUnit 4 until this inevitable upgrade, or upgrade now. We'll be in a better position for Spring Boot 2.3, at least. Other exciting changes include changing Freemarker view extensions from .ftl to .ftlh [2], trivial API churn, new Flyway, and new PostgreSQL JDBC driver. [1] spring-projects/spring-framework@233b225 [2] spring-projects/spring-boot#15131
1 parent c402092 commit 686ea0b

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.springframework.boot</groupId>
66
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>2.1.5.RELEASE</version>
7+
<version>2.2.5.RELEASE</version>
88
<relativePath />
99
</parent>
1010
<groupId>io.gitlab.mkjeldsen</groupId>
@@ -78,8 +78,8 @@
7878
<scope>test</scope>
7979
<exclusions>
8080
<exclusion>
81-
<groupId>junit</groupId>
82-
<artifactId>junit</artifactId>
81+
<groupId>org.junit.vintage</groupId>
82+
<artifactId>junit-vintage-engine</artifactId>
8383
</exclusion>
8484
</exclusions>
8585
</dependency>

src/main/java/io/gitlab/mkjeldsen/prstatbucket/AppConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ public Jdbi jdbi() {
5454
psql.setUser(env.getProperty("db.user"));
5555
psql.setPassword(env.getProperty("db.password"));
5656
psql.setDatabaseName(env.getProperty("db.database"));
57-
psql.setServerName(env.getProperty("db.server"));
58-
psql.setPortNumber(Integer.parseInt(env.getProperty("db.port")));
57+
psql.setServerNames(new String[] {env.getProperty("db.server")});
58+
psql.setPortNumbers(
59+
new int[] {Integer.parseInt(env.getProperty("db.port"))});
5960
psql.setApplicationName("prstatbucket");
6061

6162
final var hikariConfig = new HikariConfig();

src/main/java/io/gitlab/mkjeldsen/prstatbucket/PrstatbucketApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public void migrateDatabase(final ApplicationStartedEvent e) {
2525
final String database = env.getProperty("db.database");
2626

2727
final var psql = new PGSimpleDataSource();
28-
psql.setServerName(server);
29-
psql.setPortNumber(port);
28+
psql.setServerNames(new String[] {server});
29+
psql.setPortNumbers(new int[] {port});
3030
psql.setDatabaseName(database);
3131
psql.setUser(user);
3232
psql.setPassword(password);

src/main/java/io/gitlab/mkjeldsen/prstatbucket/unresolved/UnresolvedReviewController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ModelAndView asHtml() {
4040

4141
@GetMapping(
4242
value = "/unresolved",
43-
consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
43+
consumes = MediaType.APPLICATION_JSON_VALUE)
4444
@ResponseBody
4545
public ResponseEntity<List<UnresolvedReview>> asJson() {
4646
final var pullRequests = unresolvedReviewService.getOpenPullRequests();

src/test/java/io/gitlab/mkjeldsen/prstatbucket/unresolved/UnresolvedReviewControllerIntTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void serves_json_on_request() throws Exception {
9595
.thenReturn(someData);
9696

9797
final var requestJson =
98-
get("/unresolved").contentType(MediaType.APPLICATION_JSON_UTF8);
98+
get("/unresolved").contentType(MediaType.APPLICATION_JSON);
9999
final var matchingJsonBody =
100100
content().json(read("/unresolved-review.json"));
101101
final var matchingMediaType =

0 commit comments

Comments
 (0)