Skip to content

Commit

Permalink
Merge pull request #124 from KvalitetsIT/dependabot/maven/org.springf…
Browse files Browse the repository at this point in the history
…ramework.boot-spring-boot-starter-parent-3.1.1

Bump spring-boot-starter-parent from 2.7.5 to 3.1.1
  • Loading branch information
JonasPed committed Jul 7, 2023
2 parents 4e354ff + ec6f5df commit e2cbb15
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 47 deletions.
6 changes: 6 additions & 0 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -182,6 +187,7 @@
<interfaceOnly>true</interfaceOnly>
<performBeanValidation>true</performBeanValidation>
<library>spring-cloud</library>
<useSpringBoot3>true</useSpringBoot3>
</configOptions>
<output>${project.build.directory}/generated-sources/openapi/main</output>
<generateApiDocumentation>false</generateApiDocumentation>
Expand Down
6 changes: 6 additions & 0 deletions integrationtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<groupId>org.mock-server</groupId>
<artifactId>mockserver-client-java</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>mailapi</artifactId>
<groupId>com.sun.mail</groupId>
</exclusion>
</exclusions>
</dependency>

<!-- Jacoco agent to include in test docker image must not be in scope test even if only used by test. -->
Expand Down
23 changes: 10 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@
<id>Central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github-public</id>
<url>https://public:&#103;hp_Y6nRFazi9yNo0IMpxwTFIagW352c1539nyfn@maven.pkg.github.com/kvalitetsit/*</url>
</repository>
<repository>
<id>github-public1</id>
<url>https://public:&#103;hp_Y6nRFazi9yNo0IMpxwTFIagW352c1539nyfn@maven.pkg.github.com/kvalitetsit/*</url>
</repository>
</repositories>

<modules>
Expand All @@ -29,7 +21,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
<version>3.1.1</version>
</parent>
<groupId>dk.kvalitetsit.stakit-backend</groupId>
<artifactId>stakit-backend</artifactId>
Expand All @@ -41,8 +33,8 @@
<java.version>17</java.version>
<testcontainers.version>1.18.3</testcontainers.version>
<shed-lock-version>5.5.0</shed-lock-version>
<spring-prometheus-app-info-version>1.2.0</spring-prometheus-app-info-version>
<spring-request-id-logger-version>1.2.1</spring-request-id-logger-version>
<spring-prometheus-app-info-version>2.0.2</spring-prometheus-app-info-version>
<spring-request-id-logger-version>2.0.0</spring-request-id-logger-version>
<jacoco-version>0.8.10</jacoco-version>
<jsonwebtoken-version>0.11.5</jsonwebtoken-version>
</properties>
Expand Down Expand Up @@ -242,11 +234,16 @@
<version>1.8.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>



<build>
<finalName>${project.artifactId}</finalName>
<pluginManagement>
Expand Down
29 changes: 12 additions & 17 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
</dependency>

<!-- Needed for JavaMail support -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<exclusions>
<exclusion>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.sun.xml.bind</groupId>-->
<!-- <artifactId>jaxb-core</artifactId>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.eclipse.angus</groupId>-->
<!-- <artifactId>angus-activation</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->

<!-- database -->
<dependency>
Expand All @@ -61,11 +61,6 @@
<artifactId>mariadb-java-client</artifactId>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.flywaydb</groupId>-->
<!-- <artifactId>flyway-mysql</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
Expand Down Expand Up @@ -96,8 +91,8 @@

<!-- Servlet API -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dk.kvalitetsit.stakit.configuration;

import dk.kvalitetsit.stakit.dao.*;
import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -56,4 +57,12 @@ public DataSource dataSource(@Value("${jdbc.url}") String jdbcUrl, @Value("${jdb

return dataSource;
}

@Bean(initMethod = "migrate")
public Flyway flyway(DataSource dataSource) {
return Flyway.configure()
.dataSource(dataSource)
.locations("classpath:db/migration")
.load();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import dk.kvalitetsit.stakit.session.JwtTokenParser;
import dk.kvalitetsit.stakit.session.UserContextService;
import dk.kvalitetsit.stakit.session.UserContextServiceImpl;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -21,7 +22,6 @@
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.http.HttpServletRequest;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.util.List;
Expand Down Expand Up @@ -138,7 +138,7 @@ public JavaMailSender javaMailSender(@Value("${MAIL_HOST}") String host,

mailSender.setUsername(username);
mailSender.setPassword(password);

var props = mailSender.getJavaMailProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.auth", "true");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package dk.kvalitetsit.stakit.controller;

import dk.kvalitetsit.stakit.controller.exception.AbstractApiException;
import jakarta.servlet.http.HttpServletRequest;
import org.openapitools.model.BasicError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;
import java.time.OffsetDateTime;

@ControllerAdvice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import dk.kvalitetsit.stakit.service.SubscriptionService;
import dk.kvalitetsit.stakit.service.exception.InvalidDataException;
import dk.kvalitetsit.stakit.session.PublicApi;
import jakarta.mail.MessagingException;
import org.openapitools.api.StaKitApi;
import org.openapitools.model.*;
import org.slf4j.Logger;
Expand All @@ -16,7 +17,6 @@
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;

import javax.mail.MessagingException;
import java.util.List;
import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import dk.kvalitetsit.stakit.session.ApiKey;
import dk.kvalitetsit.stakit.session.PublicApi;
import dk.kvalitetsit.stakit.session.UserContextService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ApiAccessInterceptor implements HandlerInterceptor {
private static final Logger logger = LoggerFactory.getLogger(ApiAccessInterceptor.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dk.kvalitetsit.stakit.service;

import javax.mail.MessagingException;

import jakarta.mail.MessagingException;

public interface MailSenderService {
void sendMailAsync(String to, String subject, String text);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package dk.kvalitetsit.stakit.service;

import jakarta.mail.MessagingException;
import jakarta.mail.internet.MimeMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.mail.MailException;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;

public class MailSenderServiceImpl implements MailSenderService {
private static final Logger logger = LoggerFactory.getLogger(MailSenderServiceImpl.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import dk.kvalitetsit.stakit.service.exception.InvalidDataException;
import dk.kvalitetsit.stakit.service.model.SubscriptionModel;
import jakarta.mail.MessagingException;

import javax.mail.MessagingException;
import java.util.UUID;

public interface SubscriptionService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import dk.kvalitetsit.stakit.service.exception.InvalidDataException;
import dk.kvalitetsit.stakit.service.mapper.SubscriptionMapper;
import dk.kvalitetsit.stakit.service.model.SubscriptionModel;
import jakarta.mail.MessagingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.transaction.annotation.Transactional;

import javax.mail.MessagingException;
import java.util.UUID;

public class SubscriptionServiceImpl implements SubscriptionService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import dk.kvalitetsit.stakit.session.exception.InvalidTokenException;
import dk.kvalitetsit.stakit.session.model.Token;
import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import java.util.Optional;

public class UserContextServiceImpl implements UserContextService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import dk.kvalitetsit.stakit.session.ApiKey;
import dk.kvalitetsit.stakit.session.PublicApi;
import dk.kvalitetsit.stakit.session.UserContextService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.web.method.HandlerMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import dk.kvalitetsit.stakit.service.model.Status;
import dk.kvalitetsit.stakit.service.model.StatusElementModel;
import dk.kvalitetsit.stakit.service.model.StatusGroupedModel;
import jakarta.mail.MessagingException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.openapitools.model.Subscribe;
import org.springframework.http.HttpStatus;

import javax.mail.MessagingException;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import dk.kvalitetsit.stakit.dao.entity.MailSubscriptionGroupsEntity;
import dk.kvalitetsit.stakit.service.exception.InvalidDataException;
import dk.kvalitetsit.stakit.service.model.SubscriptionModel;
import jakarta.mail.MessagingException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

import javax.mail.MessagingException;
import java.util.Arrays;
import java.util.Optional;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import jakarta.servlet.http.HttpServletRequest;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
Expand Down

0 comments on commit e2cbb15

Please sign in to comment.