Skip to content

Commit 36256b5

Browse files
committed
feat: spring boot 4
1 parent 4c5873c commit 36256b5

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

backend/build.gradle

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
plugins {
1414
id 'java'
15-
id 'org.springframework.boot' version '3.5.0'
15+
id 'org.springframework.boot' version '4.0.0'
1616
id 'io.spring.dependency-management' version '1.1.7'
1717
}
1818

@@ -31,20 +31,28 @@ repositories {
3131

3232
dependencies {
3333
implementation project(':frontend')
34-
implementation 'org.springframework.boot:spring-boot-starter'
3534
implementation 'org.springframework.boot:spring-boot-starter-actuator'
36-
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
37-
implementation 'org.springframework.boot:spring-boot-starter-security'
38-
implementation 'org.springframework.boot:spring-boot-starter-web'
35+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
3936
implementation 'org.springframework.boot:spring-boot-starter-graphql'
37+
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
38+
implementation 'org.springframework.boot:spring-boot-starter-liquibase'
39+
implementation 'org.springframework.boot:spring-boot-starter-restclient'
40+
implementation 'org.springframework.boot:spring-boot-starter-security'
4041
implementation 'org.springframework.boot:spring-boot-starter-validation'
41-
implementation 'io.micrometer:micrometer-registry-prometheus'
42-
implementation 'org.liquibase:liquibase-core'
43-
implementation 'com.graphql-java:graphql-java-extended-scalars:22.0'
44-
implementation 'commons-net:commons-net:3.8.0'
45-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
46-
testImplementation 'org.springframework.security:spring-security-test'
47-
testImplementation 'org.springframework.graphql:spring-graphql-test'
42+
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
43+
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
44+
testImplementation 'org.springframework.boot:spring-boot-starter-actuator-test'
45+
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-test'
46+
testImplementation 'org.springframework.boot:spring-boot-starter-graphql-test'
47+
testImplementation 'org.springframework.boot:spring-boot-starter-hateoas-test'
48+
testImplementation 'org.springframework.boot:spring-boot-starter-liquibase-test'
49+
testImplementation 'org.springframework.boot:spring-boot-starter-restclient-test'
50+
testImplementation 'org.springframework.boot:spring-boot-starter-security-test'
51+
testImplementation 'org.springframework.boot:spring-boot-starter-validation-test'
52+
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
53+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
54+
implementation 'com.graphql-java:graphql-java-extended-scalars:24.0'
55+
implementation 'commons-net:commons-net:3.8.0'
4856
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1'
4957

5058
if(project.hasProperty('withAngular')) {
@@ -59,7 +67,7 @@ bootJar {
5967
archiveFileName = 'angularAndSpringWithMaps.jar'
6068
}
6169

62-
test {
70+
tasks.named('test') {
6371
useJUnitPlatform()
6472
}
6573

backend/src/test/java/ch/xxx/maps/adapter/controller/CompanySiteControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.junit.jupiter.api.BeforeEach;
2424
import org.mockito.Mockito;
2525
import org.springframework.beans.factory.annotation.Autowired;
26-
import org.springframework.boot.test.autoconfigure.graphql.tester.AutoConfigureGraphQlTester;
26+
import org.springframework.boot.graphql.test.autoconfigure.tester.AutoConfigureHttpGraphQlTester;
2727
import org.springframework.boot.test.context.SpringBootTest;
2828
import org.springframework.context.annotation.ComponentScan;
2929
import org.springframework.graphql.test.tester.GraphQlTester;
@@ -38,7 +38,7 @@
3838
import ch.xxx.maps.usecase.service.CompanySiteService;
3939

4040
@SpringBootTest
41-
@AutoConfigureGraphQlTester
41+
@AutoConfigureHttpGraphQlTester
4242
@ComponentScan(basePackages = "ch.xxx.maps"
4343
//,excludeFilters = @Filter(type = FilterType.REGEX, pattern = ".*\\.(adapter|usecase)\\.(repository|service).*")
4444
)

backend/src/test/java/ch/xxx/maps/architecture/MyArchitectureTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import org.junit.jupiter.api.Test;
2424
import org.slf4j.Logger;
25-
import org.springframework.boot.web.reactive.error.DefaultErrorAttributes;
25+
import org.springframework.boot.webmvc.error.DefaultErrorAttributes;
2626
import org.springframework.context.annotation.Configuration;
2727
import org.springframework.stereotype.Controller;
2828
import org.springframework.web.bind.annotation.RestController;

0 commit comments

Comments
 (0)