Skip to content

Commit

Permalink
chore(deps): updated spring boot to 3.0.6 (#107)
Browse files Browse the repository at this point in the history
chore(deps): updated spring boot to 3.0.6

chore(deps): updated camel to v4 for Spring Boot v3 support
  • Loading branch information
chgl authored Apr 29, 2023
1 parent b078ba8 commit 8b9a2a3
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ GROOVY_NPM_GROOVY_LINT_ARGUMENTS:
JAVA_CHECKSTYLE_CONFIG_FILE: src/config/checkstyle/checkstyle.xml

REPOSITORY_TRIVY_ARGUMENTS:
- "--severity=MEDIUM,HIGH,CRITICAL"
- "--severity=HIGH,CRITICAL"
- "--ignore-unfixed"
2 changes: 1 addition & 1 deletion src/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WORKDIR /home/gradle/src
ENV GRADLE_USER_HOME /gradle \
TZ="UTC"

ARG OPENTELEMETRY_JAVA_AGENT_VERSION=1.24.0
ARG OPENTELEMETRY_JAVA_AGENT_VERSION=1.25.1
RUN wget --quiet https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${OPENTELEMETRY_JAVA_AGENT_VERSION}/opentelemetry-javaagent.jar

COPY settings.gradle ./
Expand Down
2 changes: 1 addition & 1 deletion src/buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repositories {
}

dependencies {
implementation 'org.springframework.boot:spring-boot-gradle-plugin:2.7.10'
implementation 'org.springframework.boot:spring-boot-gradle-plugin:3.0.6'
implementation 'io.spring.gradle:dependency-management-plugin:1.1.0'
implementation 'com.google.cloud.tools:jib-gradle-plugin:3.3.1'
implementation 'com.diffplug.spotless:spotless-plugin-gradle:6.18.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ plugins {

task downloadOpenTelemetryJavaAgent(type: Download) {
src 'https://github.com/open-telemetry/opentelemetry-java-instrumentation' +
'/releases/download/v1.24.0/opentelemetry-javaagent.jar'
'/releases/download/v1.25.1/opentelemetry-javaagent.jar'
dest '../'
overwrite false
}
Expand Down
3 changes: 3 additions & 0 deletions src/notify/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ dependencies {

implementation 'org.springframework.retry:spring-retry:1.3.4'

// https://mvnrepository.com/artifact/jakarta.mail/jakarta.mail-api
implementation 'jakarta.mail:jakarta.mail-api:2.1.1'

testImplementation 'ognl:ognl:3.3.4'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.util.HapiExtensions;
import jakarta.annotation.PostConstruct;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.List;
import javax.annotation.PostConstruct;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.IntegerType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package org.miracum.recruit.notify.mailsender;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import jakarta.mail.MessagingException;
import jakarta.mail.internet.MimeMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;

/** Message will be prepared and will be sent by java mail sender and thymeleaf template. */
public class MailSender {
public class NotificationMailSender {
private final JavaMailSender javaMailSender;
private final TemplateEngine templateEngine;

public MailSender(JavaMailSender javaMailSender, TemplateEngine templateEngine) {
public NotificationMailSender(JavaMailSender javaMailSender, TemplateEngine templateEngine) {
this.javaMailSender = javaMailSender;
this.templateEngine = templateEngine;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import static net.logstash.logback.argument.StructuredArguments.kv;

import jakarta.mail.MessagingException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.mail.MessagingException;
import org.apache.logging.log4j.util.Strings;
import org.hl7.fhir.r4.model.CodeableConcept;
import org.hl7.fhir.r4.model.Coding;
Expand All @@ -26,7 +26,7 @@
import org.miracum.recruit.notify.mailconfig.UserConfig;
import org.miracum.recruit.notify.mailconfig.UserConfig.Subscription;
import org.miracum.recruit.notify.mailsender.MailInfo;
import org.miracum.recruit.notify.mailsender.MailSender;
import org.miracum.recruit.notify.mailsender.NotificationMailSender;
import org.miracum.recruit.notify.mailsender.NotifyInfo;
import org.miracum.recruit.notify.practitioner.PractitionerFilter;
import org.miracum.recruit.notify.practitioner.PractitionerUtils;
Expand Down Expand Up @@ -337,7 +337,7 @@ private void sendMessagesAdHoc(
kv("to", mailInfo.getTo()),
kv("subject", mailInfo.getSubject()));

var mailSender = new MailSender(javaMailSender, templateEngine);
var mailSender = new NotificationMailSender(javaMailSender, templateEngine);
try {
mailSender.sendMail(notifyInfo, mailInfo);
} catch (MessagingException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import static net.logstash.logback.argument.StructuredArguments.kv;

import com.google.common.base.Strings;
import jakarta.mail.MessagingException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import javax.mail.MessagingException;
import org.hl7.fhir.r4.model.CommunicationRequest;
import org.hl7.fhir.r4.model.CommunicationRequest.CommunicationRequestStatus;
import org.hl7.fhir.r4.model.Practitioner;
Expand All @@ -18,7 +18,7 @@
import org.miracum.recruit.notify.mailconfig.MailerConfig;
import org.miracum.recruit.notify.mailconfig.UserConfig;
import org.miracum.recruit.notify.mailsender.MailInfo;
import org.miracum.recruit.notify.mailsender.MailSender;
import org.miracum.recruit.notify.mailsender.NotificationMailSender;
import org.miracum.recruit.notify.mailsender.NotifyInfo;
import org.miracum.recruit.notify.practitioner.PractitionerUtils;
import org.slf4j.Logger;
Expand Down Expand Up @@ -92,7 +92,8 @@ public void distribute(String triggerKey) {
}

private void sendMessageList(List<CommunicationRequest> openMessages) {
// TODO: strongly type this list by using the CommunicationRequest object instead of just the
// TODO: strongly type this list by using the CommunicationRequest object
// instead of just the
// string id
var messagesSentSuccessfully = new ArrayList<String>();
var messagesSentFailed = new ArrayList<String>();
Expand Down Expand Up @@ -146,7 +147,7 @@ private void sendMessageList(List<CommunicationRequest> openMessages) {
kv("to", mailInfo.getTo()),
kv("subject", mailInfo.getSubject()));

var mailSender = new MailSender(appJavaMailSender, emailTemplateEngine);
var mailSender = new NotificationMailSender(appJavaMailSender, emailTemplateEngine);
try {
mailSender.sendMail(notifyInfo, mailInfo);
messagesSentSuccessfully.add(message.getIdElement().getIdPart());
Expand Down
20 changes: 10 additions & 10 deletions src/query/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ plugins {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-webflux'

implementation 'org.apache.camel:camel-sql:3.20.3'
implementation 'org.apache.camel:camel-jackson:3.20.3'
implementation 'org.apache.camel:camel-jsonpath:3.20.3'
implementation 'org.apache.camel:camel-fhir:3.20.3'
implementation 'org.apache.camel:camel-http:3.20.3'
implementation 'org.apache.camel:camel-cron:3.20.3'
implementation 'org.apache.camel:camel-sql:4.0.0-M2'
implementation 'org.apache.camel:camel-jackson:4.0.0-M2'
implementation 'org.apache.camel:camel-jsonpath:4.0.0-M2'
implementation 'org.apache.camel:camel-fhir:4.0.0-M2'
implementation 'org.apache.camel:camel-http:4.0.0-M2'
implementation 'org.apache.camel:camel-cron:4.0.0-M2'

implementation 'org.apache.camel.springboot:camel-rest-starter:3.20.3'
implementation 'org.apache.camel.springboot:camel-servlet-starter:3.20.3'
implementation 'org.apache.camel.springboot:camel-spring-boot-starter:3.20.3'
implementation 'org.apache.camel.springboot:camel-micrometer-starter:3.20.3'
implementation 'org.apache.camel.springboot:camel-rest-starter:4.0.0-M2'
implementation 'org.apache.camel.springboot:camel-servlet-starter:4.0.0-M2'
implementation 'org.apache.camel.springboot:camel-spring-boot-starter:4.0.0-M2'
implementation 'org.apache.camel.springboot:camel-micrometer-starter:4.0.0-M2'

implementation 'com.fasterxml.jackson.core:jackson-annotations:2.14.2'

Expand Down

0 comments on commit 8b9a2a3

Please sign in to comment.