Skip to content

Commit

Permalink
HOCS-6852- Initial build changes for spring boot 3
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothon84 committed Jan 23, 2024
1 parent 5720d3b commit 8197fa3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
21 changes: 14 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.15'
id 'io.spring.dependency-management' version '1.1.3'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.0'
}

def camelVersion = '2.25.4'
def lombokVersion = '1.18.28'
var s3MockVersion = '2.11.0'
def lombokVersion = '1.18.24'

group = 'uk.gov.digital.ho.hocs'
sourceCompatibility = JavaVersion.VERSION_17
Expand All @@ -25,28 +26,34 @@ dependencies {

implementation 'net.logstash.logback:logstash-logback-encoder:7.3'

configurations.all {
exclude group: "commons-logging", module: "commons-logging"
}

implementation "org.apache.camel:camel-spring-boot:${camelVersion}"
implementation "org.apache.camel:camel-jackson:${camelVersion}"
implementation "org.apache.camel:camel-aws:${camelVersion}"
implementation "org.apache.camel:camel-http4:${camelVersion}"
implementation 'org.apache.httpcomponents:httpmime:4.5.14'
implementation 'com.amazonaws:aws-java-sdk:1.12.137'
implementation 'com.amazonaws:aws-java-sdk:1.12.472'
implementation 'org.glassfish:javax.json:1.0.4'

implementation 'org.flywaydb:flyway-core:8.5.13'
implementation 'org.flywaydb:flyway-core:9.19.3'
runtimeOnly 'org.postgresql:postgresql:42.6.0'

compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

testImplementation 'org.awaitility:awaitility:4.2.0'
testImplementation 'com.github.tomakehurst:wiremock-standalone:3.0.1'
testImplementation 'com.github.tomakehurst:wiremock-standalone:2.27.2'
testImplementation "org.apache.camel:camel-test-spring:${camelVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.assertj:assertj-core'
testImplementation "com.adobe.testing:s3mock-junit4:${s3MockVersion}"
testImplementation "com.adobe.testing:s3mock:${s3MockVersion}"
}

jar {
enabled = false
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PreDestroy;
import jakarta.annotation.PreDestroy;

@SpringBootApplication
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uk.gov.digital.ho.hocs.document.application;

import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import java.sql.Date;
import java.time.LocalDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package uk.gov.digital.ho.hocs.document.application;

import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import java.sql.Timestamp;
import java.time.LocalDateTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class RequestData implements HandlerInterceptor {

public static final String ANONYMOUS = "anonymous";

@Override
//@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
MDC.clear();
MDC.put(CORRELATION_ID_HEADER, initialiseCorrelationId(request));
Expand All @@ -35,15 +35,15 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons
return true;
}

@Override
// @Override
public void postHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler,
ModelAndView modelAndView) {
MDC.clear();
}

@Override
//@Override
public void afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Setter;
import uk.gov.digital.ho.hocs.document.exception.ApplicationExceptions;

import javax.persistence.*;
import jakarta.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.UUID;
Expand Down

0 comments on commit 8197fa3

Please sign in to comment.