Skip to content

Upgrade Spring Boot 2.0.2 → 2.7.18 and Java 8 → 11#5

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1776274807-upgrade-java11-springboot27
Open

Upgrade Spring Boot 2.0.2 → 2.7.18 and Java 8 → 11#5
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1776274807-upgrade-java11-springboot27

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Upgrades the project from Spring Boot 2.0.2.RELEASE / Java 8 to Spring Boot 2.7.18 / Java 11, including build tool and wrapper updates.

pom.xml: Spring Boot parent → 2.7.18, java.version → 11, removed spring-boot-properties-migrator (1.x→2.x migration aid no longer needed).

build.gradle: Plugin → 2.7.18, sourceCompatibility/targetCompatibility → 11, replaced deprecated baseName/version with archiveBaseName/archiveVersion, migrated compile/testCompile to implementation/testImplementation/runtimeOnly, added spring-boot-starter-jdbc and h2 dependencies to match pom.xml.

gs-spring-boot.iml: LANGUAGE_LEVELJDK_11.

H2 compatibility: Spring Boot 2.7 pulls H2 2.x which has breaking SQL syntax changes. Added src/main/resources/application.properties with spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;MODE=LEGACY to maintain backward compatibility with the app's H2 1.x SQL (DROP TABLE ... IF EXISTS, SERIAL type).

Wrappers: Regenerated Maven wrapper (3.3.9 → 3.9.6, script-only mode) and Gradle wrapper (4.6 → 7.6.4). Old Gradle 4.6 could not run on JDK 11.

Both ./mvnw clean package and ./gradlew clean build pass on JDK 11.

Review & Testing Checklist for Human

  • Boot the app with ./mvnw spring-boot:run (or ./gradlew bootRun) and verify H2 table creation + JDBC operations succeed in the startup log — the MODE=LEGACY setting is the most critical change to validate at runtime
  • Note: Application.java calls an external API (gturnquist-quoters.cfapps.io) at startup that is likely defunct — expect a connection error on boot unrelated to this upgrade. Consider removing or replacing it in a follow-up
  • Verify gs-spring-boot.iml includes LANGUAGE_LEVEL="JDK_11" (this file is in the diff but could be easy to miss)

Notes

  • The repo has no test suite, so correctness beyond successful compilation relies on manual verification of the running application.
  • pom.xml uses <packaging>pom</packaging> which is unusual for a Spring Boot app (it skips JAR packaging in Maven). This is pre-existing and unrelated to this PR.

Link to Devin session: https://app.devin.ai/sessions/cc722fb485634c51a38c9cec3f0761a3
Requested by: @danigrim

- pom.xml: Spring Boot parent 2.7.18, java.version 11, remove spring-boot-properties-migrator
- build.gradle: spring-boot-gradle-plugin 2.7.18, sourceCompatibility/targetCompatibility 11, replace deprecated baseName/version with archiveBaseName/archiveVersion, replace compile/testCompile with implementation/testImplementation/runtimeOnly, add spring-boot-starter-jdbc and h2 dependencies
- gs-spring-boot.iml: LANGUAGE_LEVEL JDK_11
- src/main/resources/application.properties: H2 MODE=LEGACY for H2 2.x backward compatibility
- Regenerate Maven wrapper (3.9.6) and Gradle wrapper (7.6.4)

Co-Authored-By: Daniella Grimberg <daniella@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant