diff --git a/java-spring-boot/.sdkmanrc b/java-spring-boot/.sdkmanrc new file mode 100644 index 0000000..1b24546 --- /dev/null +++ b/java-spring-boot/.sdkmanrc @@ -0,0 +1,2 @@ +# Add key=value pairs of SDKs to use below +java=21-ms \ No newline at end of file diff --git a/java-spring-boot/Makefile b/java-spring-boot/Makefile index 0e3f2b5..00c4cbe 100644 --- a/java-spring-boot/Makefile +++ b/java-spring-boot/Makefile @@ -1,4 +1,5 @@ init: + ./setup-java.sh gradle build verify: diff --git a/java-spring-boot/README.md b/java-spring-boot/README.md index c215e12..c458779 100644 --- a/java-spring-boot/README.md +++ b/java-spring-boot/README.md @@ -1,9 +1,9 @@ # Java Spring Boot Project ## Tech Stack -- Java 17 +- Java 21 - JUnit 5 -- Spring Boot 3.1 +- Spring Boot 3.2.0 - Web - JPA - Lombok diff --git a/java-spring-boot/build.gradle b/java-spring-boot/build.gradle index aa4a1dd..a6e44d0 100644 --- a/java-spring-boot/build.gradle +++ b/java-spring-boot/build.gradle @@ -1,14 +1,14 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.1.4' - id 'io.spring.dependency-management' version '1.1.3' + id 'org.springframework.boot' version '3.2.0' + id 'io.spring.dependency-management' version '1.1.4' } group = 'com.sourceallies' version = '0.0.1-SNAPSHOT' java { - sourceCompatibility = '17' + sourceCompatibility = '21' } configurations { diff --git a/java-spring-boot/setup-java.sh b/java-spring-boot/setup-java.sh new file mode 100755 index 0000000..43609d5 --- /dev/null +++ b/java-spring-boot/setup-java.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +source /usr/local/sdkman/bin/sdkman-init.sh +sdk env install +sdk default java 21-ms \ No newline at end of file diff --git a/java-spring-boot/src/main/resources/application.yaml b/java-spring-boot/src/main/resources/application.yaml index df7e22e..ca07a7e 100644 --- a/java-spring-boot/src/main/resources/application.yaml +++ b/java-spring-boot/src/main/resources/application.yaml @@ -5,7 +5,7 @@ spring: - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration datasource: - # Configured to point to the docker-compose postgres DB container by default + # Configured to point to the docker-compose postgres DB container by default username: postgres password: DB_PASSWORD:postgres driver-class-name: org.postgresql.Driver