Skip to content

Commit

Permalink
New Baseline: Spring Boot 3 and Java 17
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
ThomasVitale committed Jun 5, 2024
1 parent 5b4b9f1 commit d069ea1
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions langchain4j-anthropic-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>1.9.1</version>
<scope>test</scope>
</dependency>

</dependencies>

<licenses>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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(
Expand All @@ -46,7 +46,7 @@ void should_provide_chat_model() {
});
}

@RetryingTest(maxAttempts = 3, suspendForMs = 10_000)
@Test
void should_provide_streaming_chat_model() {
contextRunner
.withPropertyValues(
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
</modules>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.boot.version>2.7.18</spring.boot.version>
<spring.boot.version>3.2.6</spring.boot.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -60,13 +60,13 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<version>1.18.32</version>
</dependency>

<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>1.19.2</version>
<version>1.19.8</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down

0 comments on commit d069ea1

Please sign in to comment.