Upgrade to Spring Boot 2.2.0.RELEASE
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
kotlin("plugin.jpa") version "1.2.71"
|
||||
id("org.springframework.boot") version "2.1.5.RELEASE"
|
||||
id("io.spring.dependency-management") version "1.0.7.RELEASE"
|
||||
kotlin("jvm") version "1.2.71"
|
||||
kotlin("plugin.spring") version "1.2.71"
|
||||
kotlin("plugin.allopen") version "1.2.71"
|
||||
kotlin("kapt") version "1.2.71"
|
||||
kotlin("plugin.jpa") version "1.3.50"
|
||||
id("org.springframework.boot") version "2.2.0.RELEASE"
|
||||
id("io.spring.dependency-management") version "1.0.8.RELEASE"
|
||||
kotlin("jvm") version "1.3.50"
|
||||
kotlin("plugin.spring") version "1.3.50"
|
||||
kotlin("plugin.allopen") version "1.3.50"
|
||||
kotlin("kapt") version "1.3.50"
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
@@ -25,7 +25,7 @@ dependencies {
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
|
||||
runtimeOnly("com.h2database:h2:1.4.197") // Fixed version as a workaround for https://github.com/h2database/h2database/issues/1841
|
||||
runtimeOnly("com.h2database:h2:1.4.200") // See https://github.com/spring-projects/spring-boot/issues/18593 and https://github.com/h2database/h2database/issues/1841
|
||||
runtimeOnly("org.springframework.boot:spring-boot-devtools")
|
||||
kapt("org.springframework.boot:spring-boot-configuration-processor")
|
||||
testImplementation("org.springframework.boot:spring-boot-starter-test") {
|
||||
@@ -34,7 +34,7 @@ dependencies {
|
||||
}
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
||||
testImplementation("com.ninja-squad:springmockk:1.1.2")
|
||||
testImplementation("com.ninja-squad:springmockk:1.1.3")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile> {
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
10
pom.xml
10
pom.xml
@@ -14,7 +14,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.1.5.RELEASE</version>
|
||||
<version>2.2.0.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<kotlin.version>1.2.71</kotlin.version>
|
||||
<kotlin.version>1.3.50</kotlin.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -56,11 +56,11 @@
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- Fixed version as a workaround for https://github.com/h2database/h2database/issues/1841 -->
|
||||
<!-- See https://github.com/spring-projects/spring-boot/issues/18593 and https://github.com/h2database/h2database/issues/1841 -->
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.4.197</version>
|
||||
<version>1.4.200</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -86,7 +86,7 @@
|
||||
<dependency>
|
||||
<groupId>com.ninja-squad</groupId>
|
||||
<artifactId>springmockk</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<version>1.1.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
package com.example.blog
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties
|
||||
import org.springframework.boot.context.properties.ConstructorBinding
|
||||
|
||||
// TODO Use "val" instead of "lateinit var" when spring-boot#8762 will be fixed
|
||||
@ConstructorBinding
|
||||
@ConfigurationProperties("blog")
|
||||
class BlogProperties {
|
||||
|
||||
lateinit var title: String
|
||||
val banner = Banner()
|
||||
|
||||
class Banner {
|
||||
var title: String? = null
|
||||
lateinit var content: String
|
||||
}
|
||||
|
||||
data class BlogProperties(var title: String, val banner: Banner) {
|
||||
data class Banner(val title: String? = null, val content: String)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class HttpControllersTests(@Autowired val mockMvc: MockMvc) {
|
||||
every { articleRepository.findAllByOrderByAddedAtDesc() } returns listOf(spring5Article, spring43Article)
|
||||
mockMvc.perform(get("/api/article/").accept(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(jsonPath("\$.[0].author.login").value(juergen.login))
|
||||
.andExpect(jsonPath("\$.[0].slug").value(spring5Article.slug))
|
||||
.andExpect(jsonPath("\$.[1].author.login").value(juergen.login))
|
||||
@@ -41,7 +41,7 @@ class HttpControllersTests(@Autowired val mockMvc: MockMvc) {
|
||||
every { userRepository.findAll() } returns listOf(juergen, smaldini)
|
||||
mockMvc.perform(get("/api/user/").accept(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().isOk)
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(jsonPath("\$.[0].login").value(juergen.login))
|
||||
.andExpect(jsonPath("\$.[1].login").value(smaldini.login))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user