Skip to content

Commit

Permalink
EPMRPP-96325 || Update to Spring Boot 3
Browse files Browse the repository at this point in the history
  • Loading branch information
APiankouski authored Oct 30, 2024
2 parents 7167fc7 + 0e9b3c7 commit 62b42cb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 64 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM gradle:8.10.0-jdk21 AS build
FROM --platform=$BUILDPLATFORM gradle:8.10.2-jdk21 AS build
ARG RELEASE_MODE
ARG APP_VERSION
WORKDIR /usr/app
Expand All @@ -9,7 +9,7 @@ RUN if [ "${RELEASE_MODE}" = true ]; then \
-Dorg.gradle.project.version=${APP_VERSION}; \
else gradle build --exclude-task test -Dorg.gradle.project.version=${APP_VERSION}; fi

FROM amazoncorretto:21.0.4
FROM amazoncorretto:21.0.5
LABEL version=${APP_VERSION} description="EPAM Report portal. Jobs Service" maintainer="Andrei Varabyeu <andrei_varabyeu@epam.com>, Hleb Kanonik <hleb_kanonik@epam.com>"
ARG APP_VERSION=${APP_VERSION}
ENV APP_DIR=/usr/app
Expand Down
46 changes: 18 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.springframework.boot' version '2.7.18'
id 'org.springframework.boot' version '3.3.5'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
}
Expand All @@ -15,7 +15,6 @@ def scriptsUrl = 'https://raw.githubusercontent.com/reportportal/gradle-scripts/

apply from: "$scriptsUrl/build-commons.gradle"
apply from: "$scriptsUrl/build-info.gradle"
//apply from: "$scriptsUrl/build-quality.gradle"
apply from: "$scriptsUrl/release-service.gradle"
apply from: "$scriptsUrl/signing.gradle"

Expand All @@ -25,7 +24,7 @@ tasks.withType(JavaCompile).configureEach {
}

wrapper {
gradleVersion = '8.10'
gradleVersion = '8.10.2'
}

bootJar {
Expand All @@ -47,63 +46,54 @@ processResources {
}
}

//https://nvd.nist.gov/vuln/detail/CVE-2020-9488 and https://nvd.nist.gov/vuln/detail/CVE-2021-44228 and https://nvd.nist.gov/vuln/detail/CVE-2021-45046 and
//https://nvd.nist.gov/vuln/detail/CVE-2021-45105
ext['log4j2.version'] = '2.21.1'
ext['log4j-to-slf4j.version'] = '2.21.1'
//https://nvd.nist.gov/vuln/detail/CVE-2022-26520
ext['postgresql.version'] = '42.6.1'
ext['snakeyaml.version'] = '2.2'
ext['spring-boot.version'] = '2.7.18'
ext['spring-boot.version'] = '3.3.5'
//

dependencies {

implementation 'org.json:json:20231013'

implementation 'net.javacrumbs.shedlock:shedlock-spring:4.46.0'
implementation 'net.javacrumbs.shedlock:shedlock-spring:5.16.0'
implementation 'net.javacrumbs.shedlock:shedlock-provider-jdbc-template:4.46.0'

// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
implementation 'org.apache.commons:commons-lang3:3.12.0'

// Fix CVE-2023-46589, CVE-2024-24549
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.86'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.86'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.86'
implementation 'org.apache.tomcat.embed:tomcat-embed-core:9.0.96'
implementation 'org.apache.tomcat.embed:tomcat-embed-el:9.0.96'
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:9.0.96'

//Fix CVE-2023-6378, CVE-2023-6481, CVE-2023-6378, CVE-2023-6481
implementation 'ch.qos.logback:logback-classic:1.2.13'
implementation 'ch.qos.logback:logback-core:1.2.13'

//Fix CVE-2023-40827, CVE-2023-40828, CVE-2023-40826
implementation 'org.springframework:spring-webmvc:5.3.33'
implementation 'org.springframework:spring-web:5.3.33'

// Fix CVE-2024-25710, CVE-2024-26308
implementation 'ch.qos.logback:logback-classic'
implementation 'ch.qos.logback:logback-core'
implementation 'org.springframework:spring-webmvc'
implementation 'org.springframework:spring-web'
implementation 'org.apache.commons:commons-compress:1.26.0'
implementation 'javax.xml.bind:jaxb-api:2.3.1'

//Fix CVE-2023-34050
implementation 'org.springframework.amqp:spring-amqp:2.4.17'
implementation 'org.springframework.amqp:spring-amqp'

implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.springframework:spring-jdbc:6.1.5'
implementation 'org.springframework:spring-jdbc'
implementation 'org.apache.jclouds.api:s3:2.5.0'
implementation 'org.apache.jclouds.provider:aws-s3:2.5.0'
implementation 'org.apache.jclouds.api:filesystem:2.5.0'
//Needed for correct jcloud work
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
// https://avd.aquasec.com/nvd/cve-2020-8908
implementation ('org.apache.httpcomponents:httpclient:4.5.14') {
exclude group: 'commons-logging', module: 'commons-logging'
}
implementation 'com.google.guava:guava:32.1.3-jre'

implementation "com.rabbitmq:http-client:5.2.0"
//Fix CVE
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.3'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.4'

runtimeOnly 'org.postgresql:postgresql'

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainerFactoryConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand Down Expand Up @@ -74,15 +73,6 @@ public RabbitAdmin rabbitAdmin(
return new RabbitAdmin(connectionFactory);
}

@Bean
SimpleRabbitListenerContainerFactory rabbitListenerContainerFactory(
SimpleRabbitListenerContainerFactoryConfigurer configurer,
@Qualifier("connectionFactory") ConnectionFactory connectionFactory) {
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
configurer.configure(factory, connectionFactory);
return factory;
}

@Bean(name = "rabbitTemplate")
public RabbitTemplate rabbitTemplate(
@Autowired @Qualifier("connectionFactory") ConnectionFactory connectionFactory,
Expand Down

0 comments on commit 62b42cb

Please sign in to comment.