Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade springboot and openjdk base images #58

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2 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