Skip to content

Commit cb21461

Browse files
authored
Bump Spring Boot baseline from 3.2 to 3.3 (#110)
## Change - Update Spring Boot baseline to 3.3.8 because 3.2.x reached EOL (2024-11-23). See: https://spring.io/projects/spring-boot#support - Use Spring Boot Dependencies BOM in parent pom.xml and simplified dependency management and versioning. - Configured main pipeline to run tests on Java 23 as well. - Fix Voyage autotests when API key is not configured. ## General checklist - [X] There are no breaking changes - [ ] I have added unit and/or integration tests for my change - [ ] The tests cover both positive and negative cases - [X] I have manually run all the unit and integration tests in the module I have added/changed, and they are all green - [ ] I have added/updated the [documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs) - [ ] I have added an example in the [examples repo](https://github.com/langchain4j/langchain4j-examples) (only for "big" features)
1 parent cc8605b commit cb21461

File tree

25 files changed

+35
-90
lines changed

25 files changed

+35
-90
lines changed

.github/workflows/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
java_build:
1313
strategy:
1414
matrix:
15-
java_version: [ 17, 21, 22 ]
15+
java_version: [ 17, 21, 22, 23 ]
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# See https://sdkman.io/usage#config
44
# A summary is to add the following to ~/.sdkman/etc/config
55
# sdkman_auto_env=true
6-
java=17.0.11-tem
6+
java=17.0.14-tem

langchain4j-anthropic-spring-boot-starter/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<dependency>
2020
<groupId>dev.langchain4j</groupId>
2121
<artifactId>langchain4j-anthropic</artifactId>
22-
<version>${project.version}</version>
2322
</dependency>
2423

2524
<dependency>

langchain4j-anthropic-spring-boot-starter/src/test/java/dev/langchain4j/anthropic/spring/AutoConfigIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import dev.langchain4j.model.output.Response;
1010
import org.junit.jupiter.api.AfterEach;
1111
import org.junit.jupiter.api.Test;
12+
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
1213
import org.springframework.boot.autoconfigure.AutoConfigurations;
1314
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
1415

@@ -17,6 +18,7 @@
1718
import static java.util.concurrent.TimeUnit.SECONDS;
1819
import static org.assertj.core.api.Assertions.assertThat;
1920

21+
@EnabledIfEnvironmentVariable(named = "ANTHROPIC_API_KEY", matches = ".+")
2022
class AutoConfigIT {
2123

2224
private static final String API_KEY = System.getenv("ANTHROPIC_API_KEY");

langchain4j-azure-ai-search-spring-boot-starter/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<dependency>
2121
<groupId>dev.langchain4j</groupId>
2222
<artifactId>langchain4j-azure-ai-search</artifactId>
23-
<version>${project.version}</version>
2423
</dependency>
2524

2625
<dependency>
@@ -57,7 +56,6 @@
5756
<dependency>
5857
<groupId>dev.langchain4j</groupId>
5958
<artifactId>langchain4j-embeddings-all-minilm-l6-v2</artifactId>
60-
<version>${project.version}</version>
6159
<scope>test</scope>
6260
</dependency>
6361

langchain4j-azure-ai-search-spring-boot-starter/src/test/java/dev/langchain4j/azure/aisearch/spring/AutoConfigIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import static java.util.Arrays.asList;
3131
import static org.assertj.core.api.Assertions.assertThat;
3232

33+
@EnabledIfEnvironmentVariable(named = "AZURE_SEARCH_KEY", matches = ".+")
3334
class AutoConfigIT {
3435

3536
private static final Logger log = LoggerFactory.getLogger(AutoConfigIT.class);

langchain4j-azure-open-ai-spring-boot-starter/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<dependency>
2121
<groupId>dev.langchain4j</groupId>
2222
<artifactId>langchain4j-azure-open-ai</artifactId>
23-
<version>${project.version}</version>
2423
</dependency>
2524

2625
<dependency>

langchain4j-azure-open-ai-spring-boot-starter/src/test/java/dev/langchain4j/azure/openai/spring/AutoConfigIT.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import dev.langchain4j.model.image.ImageModel;
2020
import dev.langchain4j.model.output.Response;
2121
import org.junit.jupiter.api.Test;
22+
import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
2223
import org.junit.jupiter.params.ParameterizedTest;
2324
import org.junit.jupiter.params.provider.CsvSource;
2425
import org.mockito.InOrder;
@@ -53,6 +54,7 @@ class AutoConfigIT {
5354
"gpt-4o-mini",
5455
"gpt-4o"
5556
})
57+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
5658
void should_provide_chat_model(String deploymentName) {
5759
contextRunner
5860
.withPropertyValues(
@@ -71,6 +73,7 @@ void should_provide_chat_model(String deploymentName) {
7173
}
7274

7375
@Test
76+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
7477
void should_provide_chat_model_with_listeners() {
7578
contextRunner
7679
.withPropertyValues(
@@ -102,6 +105,7 @@ void should_provide_chat_model_with_listeners() {
102105
@CsvSource({
103106
"gpt-4o-mini"
104107
})
108+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
105109
void should_provide_chat_model_with_json_schema(String deploymentName) {
106110
contextRunner
107111
.withPropertyValues(
@@ -142,6 +146,7 @@ void should_provide_chat_model_with_json_schema(String deploymentName) {
142146
@CsvSource({
143147
"gpt-3.5-turbo"
144148
})
149+
@EnabledIfEnvironmentVariable(named = "OPENAI_API_KEY", matches = ".+")
145150
void should_provide_chat_model_no_azure(String deploymentName) {
146151
contextRunner
147152
.withPropertyValues(
@@ -165,6 +170,7 @@ void should_provide_chat_model_no_azure(String deploymentName) {
165170
"gpt-4o-mini",
166171
"gpt-4o"
167172
})
173+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
168174
void should_provide_streaming_chat_model(String deploymentName) {
169175
contextRunner
170176
.withPropertyValues(
@@ -202,6 +208,7 @@ public void onError(Throwable error) {
202208
}
203209

204210
@Test
211+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
205212
void should_provide_streaming_chat_model_with_listeners() {
206213
contextRunner
207214
.withPropertyValues(
@@ -249,6 +256,7 @@ public void onError(Throwable error) {
249256
}
250257

251258
@Test
259+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
252260
void should_provide_embedding_model() {
253261
contextRunner
254262
.withPropertyValues("langchain4j.azure-open-ai.embedding-model.api-key=" + AZURE_OPENAI_KEY,
@@ -265,6 +273,7 @@ void should_provide_embedding_model() {
265273
}
266274

267275
@Test
276+
@EnabledIfEnvironmentVariable(named = "AZURE_OPENAI_KEY", matches = ".+")
268277
void should_provide_image_model() {
269278
contextRunner
270279
.withPropertyValues(

langchain4j-easy-rag-spring-boot-starter/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<dependency>
2020
<groupId>dev.langchain4j</groupId>
2121
<artifactId>langchain4j-easy-rag</artifactId>
22-
<version>${project.version}</version>
2322
</dependency>
2423

2524
<dependency>

langchain4j-elasticsearch-spring-boot-starter/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<dependency>
102102
<groupId>commons-io</groupId>
103103
<artifactId>commons-io</artifactId>
104-
<version>2.17.0</version>
104+
<version>2.18.0</version>
105105
<scope>test</scope>
106106
</dependency>
107107

0 commit comments

Comments
 (0)