diff --git a/build.gradle b/build.gradle index 95eb05c..46e528e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,13 @@ plugins { id 'java' id 'idea' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.0.15.RELEASE' + id 'org.springframework.boot' version '3.0.13' + id 'io.spring.dependency-management' version '1.1.7' } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } jar { @@ -25,7 +25,8 @@ dependencies { } implementation 'org.springframework.boot:spring-boot-starter-jetty' implementation 'org.springframework.boot:spring-boot-starter-actuator' - - testImplementation 'junit:junit:4.13.2' testImplementation 'org.springframework.boot:spring-boot-starter-test' } +tasks.withType(Test).configureEach { + useJUnitPlatform() +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 68e172c..5d6560a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue Sep 16 13:45:53 BST 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-1.11-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip diff --git a/src/test/java/com/tw/hello/GreeterTest.java b/src/test/java/com/tw/hello/GreeterTest.java index 9091a99..0873a86 100644 --- a/src/test/java/com/tw/hello/GreeterTest.java +++ b/src/test/java/com/tw/hello/GreeterTest.java @@ -1,9 +1,9 @@ package com.tw.hello; import com.tw.hello.controller.Greeter; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; public class GreeterTest {