Skip to content

Commit 1ed0926

Browse files
committed
feat: spring boot 4
1 parent 0dc30b5 commit 1ed0926

File tree

4 files changed

+24
-22
lines changed

4 files changed

+24
-22
lines changed

backend/build.gradle

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

1919
group = 'ch.xxx'
@@ -32,23 +32,32 @@ repositories {
3232

3333
dependencies {
3434
implementation platform("org.springframework.ai:spring-ai-bom:1.1.0")
35+
3536
implementation 'org.springframework.boot:spring-boot-starter-actuator'
3637
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
38+
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
39+
implementation 'org.springframework.boot:spring-boot-starter-liquibase'
40+
implementation 'org.springframework.boot:spring-boot-starter-restclient'
3741
implementation 'org.springframework.boot:spring-boot-starter-security'
38-
implementation 'org.springframework.boot:spring-boot-starter-web'
42+
implementation 'org.springframework.boot:spring-boot-starter-validation'
43+
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
44+
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
45+
testImplementation 'org.springframework.boot:spring-boot-starter-actuator-test'
46+
testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa-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'
3953
implementation 'org.springframework.ai:spring-ai-starter-mcp-client'
40-
//implementation 'org.springframework.ai:spring-ai-starter-mcp-server-webmvc'
4154
implementation 'org.springframework.ai:spring-ai-tika-document-reader'
42-
implementation 'org.liquibase:liquibase-core'
43-
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-csv'
44-
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
55+
implementation 'tools.jackson.dataformat:jackson-dataformat-csv:3.0.2'
4556
implementation 'net.javacrumbs.shedlock:shedlock-spring:6.0.1'
4657
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:6.0.1'
4758
implementation 'org.springframework.ai:spring-ai-starter-vector-store-pgvector'
4859
implementation 'org.springframework.ai:spring-ai-starter-model-transformers'
49-
implementation 'org.springframework.ai:spring-ai-starter-model-ollama'
50-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
51-
testImplementation 'org.springframework.security:spring-security-test'
60+
implementation 'org.springframework.ai:spring-ai-starter-model-ollama'
5261
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1'
5362
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
5463
}

backend/src/main/java/ch/xxx/aidoclibchat/adapter/client/ImportRestClient.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@
1818
import org.springframework.stereotype.Component;
1919
import org.springframework.web.client.RestClient;
2020

21-
import com.fasterxml.jackson.dataformat.csv.CsvMapper;
22-
import com.fasterxml.jackson.dataformat.csv.CsvSchema;
23-
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
24-
2521
import ch.xxx.aidoclibchat.domain.client.ImportClient;
2622
import ch.xxx.aidoclibchat.domain.model.dto.ArtistDto;
2723
import ch.xxx.aidoclibchat.domain.model.dto.MuseumDto;
@@ -36,18 +32,18 @@
3632
import ch.xxx.aidoclibchat.domain.model.entity.Work;
3733
import ch.xxx.aidoclibchat.domain.model.entity.WorkLink;
3834
import ch.xxx.aidoclibchat.usecase.mapping.TableMapper;
35+
import tools.jackson.dataformat.csv.CsvMapper;
3936

4037
@Component
4138
public class ImportRestClient implements ImportClient {
4239
private final CsvMapper csvMapper;
4340
private final TableMapper tableMapper;
4441
private final RestClient restClient;
4542

46-
public ImportRestClient(TableMapper tableMapper, RestClient restClient) {
43+
public ImportRestClient(TableMapper tableMapper, RestClient restClient, CsvMapper csvMapper) {
4744
this.tableMapper = tableMapper;
4845
this.restClient = restClient;
49-
this.csvMapper = new CsvMapper();
50-
this.csvMapper.registerModule(new JavaTimeModule());
46+
this.csvMapper = csvMapper;
5147
}
5248

5349
@Override

backend/src/main/java/ch/xxx/aidoclibchat/adapter/config/SecurityConfig.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212
*/
1313
package ch.xxx.aidoclibchat.adapter.config;
1414

15-
import org.springframework.boot.autoconfigure.security.SecurityProperties;
1615
import org.springframework.context.annotation.Bean;
1716
import org.springframework.context.annotation.Configuration;
18-
import org.springframework.core.annotation.Order;
1917
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
2018
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
2119
import org.springframework.security.config.http.SessionCreationPolicy;
@@ -26,7 +24,6 @@
2624

2725
@Configuration
2826
@EnableWebSecurity
29-
@Order(SecurityProperties.DEFAULT_FILTER_ORDER)
3027
public class SecurityConfig {
3128
// private static final Logger LOGGER = LoggerFactory.getLogger(SecurityConfig.class);
3229
/*

mcp-server/build.gradle

Lines changed: 2 additions & 2 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

@@ -34,7 +34,7 @@ dependencies {
3434
implementation platform("org.springframework.ai:spring-ai-bom:1.1.0")
3535
implementation 'org.springframework.boot:spring-boot-starter-actuator'
3636
implementation 'org.springframework.ai:spring-ai-starter-mcp-server-webmvc'
37-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
37+
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
3838
testImplementation 'com.tngtech.archunit:archunit-junit5:1.4.1'
3939
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
4040
}

0 commit comments

Comments
 (0)