Skip to content

Conversation

Copy link

Copilot AI commented Jul 7, 2025

Problem

The Spring Boot HelloWorld application in SpringRepo_Week12 was failing to compile due to a Java version mismatch. The project was configured to use Java 21, but the runtime environment only supports Java 17, causing compilation errors:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.14.0:compile (default-compile) on project helloSpringBoot: Fatal error compiling: error: release version 21 not supported

This prevented the "안녕" (Hello) greeting functionality from working properly.

Solution

Updated the Java version configuration in pom.xml to use Java 17 instead of Java 21:

<properties>
    <java.version>17</java.version>
</properties>

Verification

  • ✅ Project now compiles successfully with ./mvnw clean compile
  • ✅ All tests pass with ./mvnw test
  • ✅ Application runs successfully and displays the greeting message
  • ✅ HelloWorld endpoint accessible at http://localhost:8080/helloSpringBoot/
  • ✅ Greeting message "Hello, Spring Boot!" displays correctly along with professor and course information

Impact

This is a minimal compatibility fix that ensures the Spring Boot HelloWorld application can build and run in Java 17 environments while maintaining all existing functionality. The "안녕" (Hello) greeting feature now works as expected.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@WJLee22 WJLee22 closed this Jul 7, 2025
Copilot AI changed the title [WIP] 안녕 Fix Java version compatibility for HelloWorld Spring Boot application Jul 7, 2025
Copilot AI requested a review from WJLee22 July 7, 2025 15:06
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.

2 participants