From d069ea1cc4747716a986d41761d3f4b419c78187 Mon Sep 17 00:00:00 2001 From: Thomas Vitale Date: Wed, 5 Jun 2024 16:41:27 +0200 Subject: [PATCH] New Baseline: Spring Boot 3 and Java 17 * Minimum supported version of Java is now 17 * Minimum supported version of Spring Boot is now 3.2 Spring Boot versions older than 3.2 reached EOL and will not receive any further support nor security patches. It would be a security risk to continue using EOL-ed versions in this LangChain4j project. More information: https://spring.io/projects/spring-boot#support Signed-off-by: Thomas Vitale --- .github/workflows/main.yaml | 2 +- .github/workflows/release.yaml | 4 ++-- .sdkmanrc | 6 ++++++ langchain4j-anthropic-spring-boot-starter/pom.xml | 7 ------- .../src/main/resources/META-INF/spring.factories | 1 - .../dev/langchain4j/anthropic/spring/AutoConfigIT.java | 6 +++--- .../src/main/resources/META-INF/spring.factories | 2 -- .../src/main/resources/META-INF/spring.factories | 2 -- .../src/main/resources/META-INF/spring.factories | 1 - .../src/main/resources/META-INF/spring.factories | 1 - .../src/main/resources/META-INF/spring.factories | 1 - .../src/main/resources/META-INF/spring.factories | 1 - pom.xml | 10 +++++----- 13 files changed, 17 insertions(+), 27 deletions(-) create mode 100644 .sdkmanrc delete mode 100644 langchain4j-anthropic-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-azure-ai-search-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-azure-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-easy-rag-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-ollama-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories delete mode 100644 langchain4j-spring-boot-starter/src/main/resources/META-INF/spring.factories diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f2bd41d2..0d0a9901 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,7 +12,7 @@ jobs: java_build: strategy: matrix: - java_version: [ 8, 11, 17, 21 ] + java_version: [ 17, 21, 22 ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f1999f54..733a65a4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 8 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '8' + java-version: '17' distribution: 'temurin' cache: maven server-id: ossrh diff --git a/.sdkmanrc b/.sdkmanrc new file mode 100644 index 00000000..4e7acfef --- /dev/null +++ b/.sdkmanrc @@ -0,0 +1,6 @@ +# Use sdkman to run "sdk env" to initialize with correct JDK version +# Enable auto-env through the sdkman_auto_env config +# See https://sdkman.io/usage#config +# A summary is to add the following to ~/.sdkman/etc/config +# sdkman_auto_env=true +java=17.0.11-tem diff --git a/langchain4j-anthropic-spring-boot-starter/pom.xml b/langchain4j-anthropic-spring-boot-starter/pom.xml index c25d79a3..1b556303 100644 --- a/langchain4j-anthropic-spring-boot-starter/pom.xml +++ b/langchain4j-anthropic-spring-boot-starter/pom.xml @@ -53,13 +53,6 @@ test - - org.junit-pioneer - junit-pioneer - 1.9.1 - test - - diff --git a/langchain4j-anthropic-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-anthropic-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 6588156b..00000000 --- a/langchain4j-anthropic-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.anthropic.spring.AutoConfig \ No newline at end of file diff --git a/langchain4j-anthropic-spring-boot-starter/src/test/java/dev/langchain4j/anthropic/spring/AutoConfigIT.java b/langchain4j-anthropic-spring-boot-starter/src/test/java/dev/langchain4j/anthropic/spring/AutoConfigIT.java index 447f7126..c38d24da 100644 --- a/langchain4j-anthropic-spring-boot-starter/src/test/java/dev/langchain4j/anthropic/spring/AutoConfigIT.java +++ b/langchain4j-anthropic-spring-boot-starter/src/test/java/dev/langchain4j/anthropic/spring/AutoConfigIT.java @@ -8,7 +8,7 @@ import dev.langchain4j.model.chat.StreamingChatLanguageModel; import dev.langchain4j.model.output.Response; import org.junit.jupiter.api.AfterEach; -import org.junitpioneer.jupiter.RetryingTest; +import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunner; @@ -29,7 +29,7 @@ void afterEach() throws InterruptedException { Thread.sleep(10_000); // to avoid hitting rate limits } - @RetryingTest(maxAttempts = 3, suspendForMs = 10_000) + @Test void should_provide_chat_model() { contextRunner .withPropertyValues( @@ -46,7 +46,7 @@ void should_provide_chat_model() { }); } - @RetryingTest(maxAttempts = 3, suspendForMs = 10_000) + @Test void should_provide_streaming_chat_model() { contextRunner .withPropertyValues( diff --git a/langchain4j-azure-ai-search-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-azure-ai-search-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index a776ce4f..00000000 --- a/langchain4j-azure-ai-search-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -dev.langchain4j.azure.aisearch.spring.AutoConfig \ No newline at end of file diff --git a/langchain4j-azure-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-azure-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index bcf2d8b7..00000000 --- a/langchain4j-azure-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -dev.langchain4j.azure.openai.spring.AutoConfig diff --git a/langchain4j-easy-rag-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-easy-rag-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 4ded5330..00000000 --- a/langchain4j-easy-rag-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.rag.easy.spring.EasyRagAutoConfig \ No newline at end of file diff --git a/langchain4j-ollama-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-ollama-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index f4d12b60..00000000 --- a/langchain4j-ollama-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.ollama.spring.AutoConfig \ No newline at end of file diff --git a/langchain4j-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 15f3e0c7..00000000 --- a/langchain4j-open-ai-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.openai.spring.AutoConfig \ No newline at end of file diff --git a/langchain4j-spring-boot-starter/src/main/resources/META-INF/spring.factories b/langchain4j-spring-boot-starter/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 7c967b04..00000000 --- a/langchain4j-spring-boot-starter/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=dev.langchain4j.spring.LangChain4jAutoConfig \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4bd6b00f..60f8d1ae 100644 --- a/pom.xml +++ b/pom.xml @@ -24,10 +24,10 @@ - 1.8 - 1.8 + 17 + 17 UTF-8 - 2.7.18 + 3.2.6 @@ -60,13 +60,13 @@ org.projectlombok lombok - 1.18.30 + 1.18.32 org.testcontainers testcontainers-bom - 1.19.2 + 1.19.8 import pom