Skip to content

Commit

Permalink
Upgrade springboot dependency and openjdk base image
Browse files Browse the repository at this point in the history
  • Loading branch information
gl-johnson committed Feb 6, 2023
1 parent b01a5dc commit 38a2d2e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]
### Security
- Updated Springboot to 3.0.0 and Dockerfile to openjdk:21
[conjurdemos/pet-store-demo#58](https://github.com/conjurdemos/pet-store-demo/pull/58)
- Updated postgresql to 42.5.1 to resolve CVE-2022-41946
[conjurdemos/pet-store-demo#57](https://github.com/conjurdemos/pet-store-demo/pull/57)
- Updated Spring boot to 2.7.5 to pull in fixes for jackson-databind for
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN curl -sSL https://raw.githubusercontent.com/cyberark/summon/master/install.s

# STAGE:
# The 'maven' base is used to package the application
FROM maven:3.8.5-openjdk-11-slim as maven
FROM maven:3-openjdk-18-slim as maven

WORKDIR /app

Expand All @@ -35,7 +35,7 @@ RUN mvn package && cp target/petstore-*.jar app.jar
# This base is used for the final image
# It extracts the packaged application from the previous stage
# and builds the final image
FROM openjdk:11-jdk-slim
FROM openjdk:21-slim
LABEL org.opencontainers.image.authors="CyberArk"

# Install the fix for CVE-2022-1271
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<version>3.0.2</version>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.7.5</version>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
Expand All @@ -41,7 +41,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.7.5</version>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
Expand All @@ -51,7 +51,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.7.5</version>
<version>3.0.2</version>
</dependency>
</dependencies>

Expand Down
14 changes: 7 additions & 7 deletions src/main/java/hello/model/Pet.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package hello.model;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Column;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.Id;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Column;
import jakarta.validation.constraints.NotNull;

@Entity
@Table(name = "pet")
Expand Down

0 comments on commit 38a2d2e

Please sign in to comment.