From 9ea02f8208fd452fe4d99a76539c791e15db5a06 Mon Sep 17 00:00:00 2001 From: _Bastler Date: Mon, 27 Nov 2023 15:21:42 +0100 Subject: [PATCH] upgrade to spring boot 3.2.0 --- .gitignore | 25 +++++++++- .../main/java/de/bstly/we/Application.java | 8 ++-- borrow/pom.xml | 10 +++- .../controller/BorrowRequestController.java | 4 +- .../de/bstly/we/borrow/model/BorrowItem.java | 20 ++++---- .../we/borrow/model/BorrowItemManualSlot.java | 6 +-- .../we/borrow/model/BorrowItemPeriodSlot.java | 10 ++-- .../bstly/we/borrow/model/BorrowItemSlot.java | 18 +++---- .../bstly/we/borrow/model/BorrowRequest.java | 20 ++++---- core/pom.xml | 13 +++-- .../java/de/bstly/we/CoreConfiguration.java | 2 +- .../bstly/we/businesslogic/UserManager.java | 12 ++++- .../support/AbstractModelEventListener.java | 14 +++--- .../controller/AuthenticationController.java | 4 +- .../bstly/we/controller/ItemController.java | 2 +- .../we/controller/PermissionController.java | 2 +- .../we/controller/PretixApiController.java | 2 +- .../bstly/we/controller/QuotaController.java | 2 +- .../bstly/we/controller/UserController.java | 2 +- .../EntityResponseStatusException.java | 12 ++--- .../support/TokenSessionManager.java | 2 +- .../java/de/bstly/we/model/Permission.java | 12 ++--- .../de/bstly/we/model/PermissionMapping.java | 22 ++++----- .../de/bstly/we/model/PersistentLogin.java | 8 ++-- .../main/java/de/bstly/we/model/Quota.java | 12 ++--- .../java/de/bstly/we/model/QuotaMapping.java | 16 +++---- .../de/bstly/we/model/SystemProfileField.java | 8 ++-- .../de/bstly/we/model/SystemProperty.java | 10 ++-- .../src/main/java/de/bstly/we/model/User.java | 14 +++--- .../java/de/bstly/we/model/UserAlias.java | 14 +++--- .../java/de/bstly/we/model/UserDomain.java | 14 +++--- .../de/bstly/we/model/UserProfileField.java | 14 +++--- .../main/java/de/bstly/we/model/UserTotp.java | 18 +++---- .../de/bstly/we/model/VoucherMapping.java | 12 ++--- .../LocalAuthenticationEntryPoint.java | 10 ++-- .../we/security/LocalRememberMeServices.java | 6 +-- .../we/security/PasswordEncoderConfig.java | 48 ++++++++++++++++++- .../de/bstly/we/security/SecurityConfig.java | 6 ++- .../FormSecondFactorAuthenticationFilter.java | 12 ++--- .../LocalAnonymousAuthenticationFilter.java | 16 +++---- .../filter/RestAuthenticationFilter.java | 10 ++-- .../RestSecondFactorAuthenticationFilter.java | 14 +++--- .../FormAuthenticationSuccessHandler.java | 8 ++-- .../RestAuthenticationFailureHandler.java | 10 ++-- .../RestAuthenticationSuccessHandler.java | 10 ++-- i18n/pom.xml | 8 ++++ .../we/i18n/controller/I18nController.java | 2 +- .../java/de/bstly/we/i18n/model/I18n.java | 12 ++--- invite/pom.xml | 8 ++++ .../java/de/bstly/we/invite/model/Invite.java | 14 +++--- .../bstly/we/invite/model/InviteMapping.java | 8 ++-- jitsi/pom.xml | 10 +++- .../de/bstly/we/jitsi/model/JitsiRoom.java | 14 +++--- .../jukebox/controller/JukeboxController.java | 2 +- .../JukeboxManagementController.java | 2 +- jwt/pom.xml | 13 ++++- .../we/jwt/businesslogic/JwtKeyManager.java | 2 +- .../jwt/controller/JwtUserDataController.java | 4 +- .../java/de/bstly/we/jwt/model/JwtKey.java | 17 ++++--- .../controller/MembershipController.java | 2 +- .../we/minetest/model/MinetestAccount.java | 10 ++-- oidc/pom.xml | 8 ++++ .../oidc/businesslogic/OidcClientManager.java | 2 +- .../businesslogic/OidcSessionManager.java | 3 +- .../OidcAuthorizationController.java | 4 +- .../controller/OidcDiscoveryController.java | 4 +- .../controller/OidcSessionController.java | 4 +- .../oidc/controller/OidcTokenController.java | 6 +-- .../we/oidc/model/OidcAuthorization.java | 16 +++---- .../de/bstly/we/oidc/model/OidcClient.java | 20 ++++---- .../de/bstly/we/oidc/model/OidcSession.java | 12 ++--- .../de/bstly/we/oidc/model/OidcToken.java | 14 +++--- partey/pom.xml | 8 ++++ .../api/controller/DebugController.java | 4 +- .../partey/api/controller/MapController.java | 4 +- .../api/controller/ReportController.java | 2 +- .../partey/api/controller/RoomController.java | 2 +- .../partey/api/controller/WokaController.java | 2 +- .../api/controller/support/DebugLogger.java | 2 +- .../api/security/ParteyApiAuthentication.java | 2 +- .../businesslogic/ParteyMapManager.java | 2 +- .../de/bstly/we/partey/model/ParteyMap.java | 14 +++--- .../we/partey/model/ParteyUserReport.java | 12 ++--- .../model/ParteyUserReportModerator.java | 10 ++-- .../bstly/we/partey/model/ParteyUserTag.java | 10 ++-- .../we/partey/model/ParteyUserTextures.java | 12 ++--- .../we/partey/timeslot/model/Timeslot.java | 20 ++++---- pom.xml | 33 +++---------- services/pom.xml | 8 ++++ .../de/bstly/we/services/model/Service.java | 10 ++-- urlshortener/pom.xml | 8 ++++ .../controller/ShortenedUrlController.java | 4 +- .../we/urlshortener/model/ShortenedUrl.java | 14 +++--- wireguard/pom.xml | 8 ++++ 94 files changed, 535 insertions(+), 391 deletions(-) diff --git a/.gitignore b/.gitignore index 613c139..3517dbc 100755 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,31 @@ bin/ target/ +config/ .settings/ .project .classpath hs_err*.log application.properties -usernames.txt \ No newline at end of file +usernames.txt + +# IDEs and editors +.idea/ +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# Visual Studio Code +.vscode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +.history/* + +# System files +.DS_Store +Thumbs.db \ No newline at end of file diff --git a/application/src/main/java/de/bstly/we/Application.java b/application/src/main/java/de/bstly/we/Application.java index dfaf09e..5f8e767 100755 --- a/application/src/main/java/de/bstly/we/Application.java +++ b/application/src/main/java/de/bstly/we/Application.java @@ -5,9 +5,9 @@ package de.bstly.we; import java.util.EnumSet; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.SessionTrackingMode; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.SessionTrackingMode; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -33,7 +33,7 @@ public class Application extends SpringBootServletInitializer { /* * @see * org.springframework.boot.web.servlet.support.SpringBootServletInitializer# - * onStartup(javax.servlet.ServletContext) + * onStartup(jakarta.servlet.ServletContext) */ @Override public void onStartup(ServletContext servletContext) throws ServletException { diff --git a/borrow/pom.xml b/borrow/pom.xml index ff245b1..a4440ed 100644 --- a/borrow/pom.xml +++ b/borrow/pom.xml @@ -21,6 +21,14 @@ de.bstly.we webstly-jwt ${revision} + + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta - + \ No newline at end of file diff --git a/borrow/src/main/java/de/bstly/we/borrow/controller/BorrowRequestController.java b/borrow/src/main/java/de/bstly/we/borrow/controller/BorrowRequestController.java index 8c8f7ae..c920054 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/controller/BorrowRequestController.java +++ b/borrow/src/main/java/de/bstly/we/borrow/controller/BorrowRequestController.java @@ -6,8 +6,8 @@ package de.bstly.we.borrow.controller; import java.text.ParseException; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItem.java b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItem.java index 49874b9..dff54bf 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItem.java +++ b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItem.java @@ -6,16 +6,16 @@ package de.bstly.we.borrow.model; import java.time.Duration; import java.util.List; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemManualSlot.java b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemManualSlot.java index 426d854..fecc4f7 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemManualSlot.java +++ b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemManualSlot.java @@ -5,9 +5,9 @@ package de.bstly.we.borrow.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; /** * The Class BorrowItemManualSlot. diff --git a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemPeriodSlot.java b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemPeriodSlot.java index ffca30b..1b225a7 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemPeriodSlot.java +++ b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemPeriodSlot.java @@ -6,11 +6,11 @@ package de.bstly.we.borrow.model; import java.time.DayOfWeek; import java.time.LocalTime; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.Table; /** * The Class BorrowItemPeriodSlot. diff --git a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemSlot.java b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemSlot.java index 73712b4..057d2e2 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemSlot.java +++ b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowItemSlot.java @@ -3,15 +3,15 @@ */ package de.bstly.we.borrow.model; -import javax.persistence.Column; -import javax.persistence.DiscriminatorColumn; -import javax.persistence.DiscriminatorType; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Inheritance; -import javax.persistence.InheritanceType; +import jakarta.persistence.Column; +import jakarta.persistence.DiscriminatorColumn; +import jakarta.persistence.DiscriminatorType; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Inheritance; +import jakarta.persistence.InheritanceType; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; diff --git a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowRequest.java b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowRequest.java index 7c2718b..c354cdd 100644 --- a/borrow/src/main/java/de/bstly/we/borrow/model/BorrowRequest.java +++ b/borrow/src/main/java/de/bstly/we/borrow/model/BorrowRequest.java @@ -5,16 +5,16 @@ package de.bstly.we.borrow.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import de.bstly.we.model.UserData; diff --git a/core/pom.xml b/core/pom.xml index 59df752..84560db 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -41,12 +41,15 @@ com.querydsl - querydsl-apt + querydsl-jpa + ${querydsl.version} + jakarta - com.querydsl - querydsl-jpa + querydsl-apt + ${querydsl.version} + jakarta @@ -70,7 +73,7 @@ org.passay passay - 1.6.1 + 1.6.4 @@ -102,4 +105,4 @@ 1.9.0 - + \ No newline at end of file diff --git a/core/src/main/java/de/bstly/we/CoreConfiguration.java b/core/src/main/java/de/bstly/we/CoreConfiguration.java index 2048cbe..e013274 100644 --- a/core/src/main/java/de/bstly/we/CoreConfiguration.java +++ b/core/src/main/java/de/bstly/we/CoreConfiguration.java @@ -3,7 +3,7 @@ */ package de.bstly.we; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; diff --git a/core/src/main/java/de/bstly/we/businesslogic/UserManager.java b/core/src/main/java/de/bstly/we/businesslogic/UserManager.java index 840bcab..5942688 100755 --- a/core/src/main/java/de/bstly/we/businesslogic/UserManager.java +++ b/core/src/main/java/de/bstly/we/businesslogic/UserManager.java @@ -10,8 +10,9 @@ import java.io.IOException; import java.io.InputStreamReader; import java.util.List; import java.util.Map; +import java.util.StringTokenizer; -import javax.servlet.ServletOutputStream; +import jakarta.servlet.ServletOutputStream; import org.apache.commons.lang3.RandomStringUtils; import org.slf4j.Logger; @@ -238,7 +239,14 @@ public class UserManager implements UserDataProvider { myWriter.write(publicKey); myWriter.close(); String command = "gpg --import " + publicKeyPath; - Runtime.getRuntime().exec(command); + StringTokenizer st = new StringTokenizer(command); + String[] cmdarray = new String[st.countTokens()]; + int i = 0; + while (st.hasMoreTokens()) { + cmdarray[i] = st.nextToken(); + i++; + } + Runtime.getRuntime().exec(cmdarray); } catch (IOException e) { e.printStackTrace(); } diff --git a/core/src/main/java/de/bstly/we/businesslogic/support/AbstractModelEventListener.java b/core/src/main/java/de/bstly/we/businesslogic/support/AbstractModelEventListener.java index f052ae6..d8dcbd5 100644 --- a/core/src/main/java/de/bstly/we/businesslogic/support/AbstractModelEventListener.java +++ b/core/src/main/java/de/bstly/we/businesslogic/support/AbstractModelEventListener.java @@ -3,13 +3,13 @@ */ package de.bstly.we.businesslogic.support; -import javax.persistence.PostLoad; -import javax.persistence.PostPersist; -import javax.persistence.PostRemove; -import javax.persistence.PostUpdate; -import javax.persistence.PrePersist; -import javax.persistence.PreRemove; -import javax.persistence.PreUpdate; +import jakarta.persistence.PostLoad; +import jakarta.persistence.PostPersist; +import jakarta.persistence.PostRemove; +import jakarta.persistence.PostUpdate; +import jakarta.persistence.PrePersist; +import jakarta.persistence.PreRemove; +import jakarta.persistence.PreUpdate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; diff --git a/core/src/main/java/de/bstly/we/controller/AuthenticationController.java b/core/src/main/java/de/bstly/we/controller/AuthenticationController.java index daa9cb9..cb6e7e4 100755 --- a/core/src/main/java/de/bstly/we/controller/AuthenticationController.java +++ b/core/src/main/java/de/bstly/we/controller/AuthenticationController.java @@ -6,8 +6,8 @@ package de.bstly.we.controller; import java.io.IOException; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; diff --git a/core/src/main/java/de/bstly/we/controller/ItemController.java b/core/src/main/java/de/bstly/we/controller/ItemController.java index 3ef3eb0..0bf25ed 100755 --- a/core/src/main/java/de/bstly/we/controller/ItemController.java +++ b/core/src/main/java/de/bstly/we/controller/ItemController.java @@ -6,7 +6,7 @@ package de.bstly.we.controller; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/core/src/main/java/de/bstly/we/controller/PermissionController.java b/core/src/main/java/de/bstly/we/controller/PermissionController.java index e1403cc..f72e012 100644 --- a/core/src/main/java/de/bstly/we/controller/PermissionController.java +++ b/core/src/main/java/de/bstly/we/controller/PermissionController.java @@ -5,7 +5,7 @@ package de.bstly.we.controller; import java.util.List; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; diff --git a/core/src/main/java/de/bstly/we/controller/PretixApiController.java b/core/src/main/java/de/bstly/we/controller/PretixApiController.java index 6dde47e..2e0e8bf 100755 --- a/core/src/main/java/de/bstly/we/controller/PretixApiController.java +++ b/core/src/main/java/de/bstly/we/controller/PretixApiController.java @@ -6,7 +6,7 @@ package de.bstly.we.controller; import java.io.IOException; import java.util.Map.Entry; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; diff --git a/core/src/main/java/de/bstly/we/controller/QuotaController.java b/core/src/main/java/de/bstly/we/controller/QuotaController.java index 8e93b23..d309603 100644 --- a/core/src/main/java/de/bstly/we/controller/QuotaController.java +++ b/core/src/main/java/de/bstly/we/controller/QuotaController.java @@ -5,7 +5,7 @@ package de.bstly.we.controller; import java.util.List; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; diff --git a/core/src/main/java/de/bstly/we/controller/UserController.java b/core/src/main/java/de/bstly/we/controller/UserController.java index e3d43e5..6e5674e 100755 --- a/core/src/main/java/de/bstly/we/controller/UserController.java +++ b/core/src/main/java/de/bstly/we/controller/UserController.java @@ -3,7 +3,7 @@ */ package de.bstly.we.controller; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/core/src/main/java/de/bstly/we/controller/support/EntityResponseStatusException.java b/core/src/main/java/de/bstly/we/controller/support/EntityResponseStatusException.java index b0f76b8..9831a33 100644 --- a/core/src/main/java/de/bstly/we/controller/support/EntityResponseStatusException.java +++ b/core/src/main/java/de/bstly/we/controller/support/EntityResponseStatusException.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; import org.springframework.core.NestedExceptionUtils; import org.springframework.core.NestedRuntimeException; -import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; import org.springframework.util.Assert; /** @@ -20,7 +20,7 @@ public class EntityResponseStatusException extends NestedRuntimeException { */ private static final long serialVersionUID = 1L; - private final HttpStatus status; + private final HttpStatusCode status; @Nullable private final Object body; @@ -30,7 +30,7 @@ public class EntityResponseStatusException extends NestedRuntimeException { * * @param status the status */ - public EntityResponseStatusException(HttpStatus status) { + public EntityResponseStatusException(HttpStatusCode status) { this(null, status); } @@ -40,7 +40,7 @@ public class EntityResponseStatusException extends NestedRuntimeException { * @param body the body * @param status the status */ - public EntityResponseStatusException(@Nullable Object body, HttpStatus status) { + public EntityResponseStatusException(@Nullable Object body, HttpStatusCode status) { this(body, status, null); } @@ -51,7 +51,7 @@ public class EntityResponseStatusException extends NestedRuntimeException { * @param status the status * @param cause the cause */ - public EntityResponseStatusException(@Nullable Object body, HttpStatus status, @Nullable Throwable cause) { + public EntityResponseStatusException(@Nullable Object body, HttpStatusCode status, @Nullable Throwable cause) { super(null, cause); Assert.notNull(status, "HttpStatus is required"); this.status = status; @@ -63,7 +63,7 @@ public class EntityResponseStatusException extends NestedRuntimeException { * * @return the status */ - public HttpStatus getStatus() { + public HttpStatusCode getStatus() { return this.status; } diff --git a/core/src/main/java/de/bstly/we/controller/support/TokenSessionManager.java b/core/src/main/java/de/bstly/we/controller/support/TokenSessionManager.java index 0ac5c80..6b863a7 100644 --- a/core/src/main/java/de/bstly/we/controller/support/TokenSessionManager.java +++ b/core/src/main/java/de/bstly/we/controller/support/TokenSessionManager.java @@ -7,7 +7,7 @@ import java.time.Instant; import java.util.List; import java.util.Set; -import javax.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; diff --git a/core/src/main/java/de/bstly/we/model/Permission.java b/core/src/main/java/de/bstly/we/model/Permission.java index d22c80a..27decf1 100755 --- a/core/src/main/java/de/bstly/we/model/Permission.java +++ b/core/src/main/java/de/bstly/we/model/Permission.java @@ -5,12 +5,12 @@ package de.bstly.we.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class Permission. diff --git a/core/src/main/java/de/bstly/we/model/PermissionMapping.java b/core/src/main/java/de/bstly/we/model/PermissionMapping.java index 8e3b4c5..0f4d413 100755 --- a/core/src/main/java/de/bstly/we/model/PermissionMapping.java +++ b/core/src/main/java/de/bstly/we/model/PermissionMapping.java @@ -7,17 +7,17 @@ import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.Set; -import javax.persistence.AttributeConverter; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.Convert; -import javax.persistence.Converter; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.AttributeConverter; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.Convert; +import jakarta.persistence.Converter; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/core/src/main/java/de/bstly/we/model/PersistentLogin.java b/core/src/main/java/de/bstly/we/model/PersistentLogin.java index b493931..f157671 100644 --- a/core/src/main/java/de/bstly/we/model/PersistentLogin.java +++ b/core/src/main/java/de/bstly/we/model/PersistentLogin.java @@ -5,10 +5,10 @@ package de.bstly.we.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class PersistentLogin. diff --git a/core/src/main/java/de/bstly/we/model/Quota.java b/core/src/main/java/de/bstly/we/model/Quota.java index b9c4edc..1258e5e 100644 --- a/core/src/main/java/de/bstly/we/model/Quota.java +++ b/core/src/main/java/de/bstly/we/model/Quota.java @@ -3,12 +3,12 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class Quota. diff --git a/core/src/main/java/de/bstly/we/model/QuotaMapping.java b/core/src/main/java/de/bstly/we/model/QuotaMapping.java index b2cdba2..96611ed 100644 --- a/core/src/main/java/de/bstly/we/model/QuotaMapping.java +++ b/core/src/main/java/de/bstly/we/model/QuotaMapping.java @@ -5,14 +5,14 @@ package de.bstly.we.model; import java.util.Set; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/core/src/main/java/de/bstly/we/model/SystemProfileField.java b/core/src/main/java/de/bstly/we/model/SystemProfileField.java index 9a37561..8604f7b 100644 --- a/core/src/main/java/de/bstly/we/model/SystemProfileField.java +++ b/core/src/main/java/de/bstly/we/model/SystemProfileField.java @@ -3,10 +3,10 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class SystemProfileField. diff --git a/core/src/main/java/de/bstly/we/model/SystemProperty.java b/core/src/main/java/de/bstly/we/model/SystemProperty.java index fb57992..0f3bdc8 100755 --- a/core/src/main/java/de/bstly/we/model/SystemProperty.java +++ b/core/src/main/java/de/bstly/we/model/SystemProperty.java @@ -3,11 +3,11 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; /** * The Class SystemProperty. diff --git a/core/src/main/java/de/bstly/we/model/User.java b/core/src/main/java/de/bstly/we/model/User.java index dbc0324..1fc4dae 100755 --- a/core/src/main/java/de/bstly/we/model/User.java +++ b/core/src/main/java/de/bstly/we/model/User.java @@ -3,13 +3,13 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/core/src/main/java/de/bstly/we/model/UserAlias.java b/core/src/main/java/de/bstly/we/model/UserAlias.java index a98b674..7da64cd 100644 --- a/core/src/main/java/de/bstly/we/model/UserAlias.java +++ b/core/src/main/java/de/bstly/we/model/UserAlias.java @@ -3,13 +3,13 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; /** * The Class UserAlias. diff --git a/core/src/main/java/de/bstly/we/model/UserDomain.java b/core/src/main/java/de/bstly/we/model/UserDomain.java index b763f45..34cff49 100644 --- a/core/src/main/java/de/bstly/we/model/UserDomain.java +++ b/core/src/main/java/de/bstly/we/model/UserDomain.java @@ -3,13 +3,13 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; /** * The Class UserDomain. diff --git a/core/src/main/java/de/bstly/we/model/UserProfileField.java b/core/src/main/java/de/bstly/we/model/UserProfileField.java index fc0ebd2..6540e1a 100644 --- a/core/src/main/java/de/bstly/we/model/UserProfileField.java +++ b/core/src/main/java/de/bstly/we/model/UserProfileField.java @@ -5,13 +5,13 @@ package de.bstly.we.model; import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import de.bstly.we.model.UserProfileField.UserProfileFieldId; diff --git a/core/src/main/java/de/bstly/we/model/UserTotp.java b/core/src/main/java/de/bstly/we/model/UserTotp.java index ca9b691..2fb04a7 100644 --- a/core/src/main/java/de/bstly/we/model/UserTotp.java +++ b/core/src/main/java/de/bstly/we/model/UserTotp.java @@ -5,15 +5,15 @@ package de.bstly.we.model; import java.util.List; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/core/src/main/java/de/bstly/we/model/VoucherMapping.java b/core/src/main/java/de/bstly/we/model/VoucherMapping.java index 67eb919..c97566d 100644 --- a/core/src/main/java/de/bstly/we/model/VoucherMapping.java +++ b/core/src/main/java/de/bstly/we/model/VoucherMapping.java @@ -3,12 +3,12 @@ */ package de.bstly.we.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class VoucherMapping. diff --git a/core/src/main/java/de/bstly/we/security/LocalAuthenticationEntryPoint.java b/core/src/main/java/de/bstly/we/security/LocalAuthenticationEntryPoint.java index 500b8b9..288185d 100644 --- a/core/src/main/java/de/bstly/we/security/LocalAuthenticationEntryPoint.java +++ b/core/src/main/java/de/bstly/we/security/LocalAuthenticationEntryPoint.java @@ -6,9 +6,9 @@ package de.bstly.we.security; import java.io.IOException; import java.util.List; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; import org.springframework.security.core.AuthenticationException; @@ -35,8 +35,8 @@ public class LocalAuthenticationEntryPoint extends LoginUrlAuthenticationEntryPo /* * @see org.springframework.security.web.authentication. - * LoginUrlAuthenticationEntryPoint#commence(javax.servlet.http. - * HttpServletRequest, javax.servlet.http.HttpServletResponse, + * LoginUrlAuthenticationEntryPoint#commence(jakarta.servlet.http. + * HttpServletRequest, jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.AuthenticationException) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/LocalRememberMeServices.java b/core/src/main/java/de/bstly/we/security/LocalRememberMeServices.java index 5022aca..da04a88 100644 --- a/core/src/main/java/de/bstly/we/security/LocalRememberMeServices.java +++ b/core/src/main/java/de/bstly/we/security/LocalRememberMeServices.java @@ -9,8 +9,8 @@ import java.util.Arrays; import java.util.Date; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.log.LogMessage; @@ -54,7 +54,7 @@ public class LocalRememberMeServices extends PersistentTokenBasedRememberMeServi /* * @see org.springframework.security.web.authentication.rememberme. - * AbstractRememberMeServices#rememberMeRequested(javax.servlet.http. + * AbstractRememberMeServices#rememberMeRequested(jakarta.servlet.http. * HttpServletRequest, java.lang.String) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/PasswordEncoderConfig.java b/core/src/main/java/de/bstly/we/security/PasswordEncoderConfig.java index 072e62b..2f11a6d 100644 --- a/core/src/main/java/de/bstly/we/security/PasswordEncoderConfig.java +++ b/core/src/main/java/de/bstly/we/security/PasswordEncoderConfig.java @@ -7,6 +7,18 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.crypto.argon2.Argon2PasswordEncoder; +import dev.samstevens.totp.code.CodeGenerator; +import dev.samstevens.totp.code.CodeVerifier; +import dev.samstevens.totp.code.DefaultCodeGenerator; +import dev.samstevens.totp.code.DefaultCodeVerifier; +import dev.samstevens.totp.code.HashingAlgorithm; +import dev.samstevens.totp.qr.QrDataFactory; +import dev.samstevens.totp.recovery.RecoveryCodeGenerator; +import dev.samstevens.totp.secret.DefaultSecretGenerator; +import dev.samstevens.totp.secret.SecretGenerator; +import dev.samstevens.totp.time.SystemTimeProvider; +import dev.samstevens.totp.time.TimeProvider; + /** * The Class PasswordEncoderConfig. */ @@ -20,6 +32,40 @@ public class PasswordEncoderConfig { */ @Bean(name = "passwordEncoder") public Argon2PasswordEncoder passwordEncoder() { - return new Argon2PasswordEncoder(); + return Argon2PasswordEncoder.defaultsForSpringSecurity_v5_8(); + } + + @Bean + public SecretGenerator secretGenerator() { + return new DefaultSecretGenerator(32); + } + + @Bean + public TimeProvider timeProvider() { + return new SystemTimeProvider(); + } + + @Bean + public CodeGenerator codeGenerator() { + return new DefaultCodeGenerator(HashingAlgorithm.SHA1, 6); + } + + @Bean + public CodeVerifier codeVerifier() { + DefaultCodeVerifier verifier = new DefaultCodeVerifier(codeGenerator(), timeProvider()); + verifier.setTimePeriod(30); + verifier.setAllowedTimePeriodDiscrepancy(1); + + return verifier; + } + + @Bean + public QrDataFactory qrDataFactory() { + return new QrDataFactory(HashingAlgorithm.SHA1, 6, 30); + } + + @Bean + public RecoveryCodeGenerator recoveryCodeGenerator() { + return new RecoveryCodeGenerator(); } } diff --git a/core/src/main/java/de/bstly/we/security/SecurityConfig.java b/core/src/main/java/de/bstly/we/security/SecurityConfig.java index 41fa8a4..54f201e 100755 --- a/core/src/main/java/de/bstly/we/security/SecurityConfig.java +++ b/core/src/main/java/de/bstly/we/security/SecurityConfig.java @@ -13,9 +13,10 @@ import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.http.SessionCreationPolicy; @@ -51,7 +52,8 @@ import dev.samstevens.totp.code.HashingAlgorithm; * The Class SecurityConfig. */ @EnableWebSecurity -@EnableGlobalMethodSecurity(prePostEnabled = true) +@EnableMethodSecurity(prePostEnabled = true) +@Configuration public class SecurityConfig { @Autowired diff --git a/core/src/main/java/de/bstly/we/security/filter/FormSecondFactorAuthenticationFilter.java b/core/src/main/java/de/bstly/we/security/filter/FormSecondFactorAuthenticationFilter.java index 00bb174..f057b4d 100644 --- a/core/src/main/java/de/bstly/we/security/filter/FormSecondFactorAuthenticationFilter.java +++ b/core/src/main/java/de/bstly/we/security/filter/FormSecondFactorAuthenticationFilter.java @@ -5,9 +5,9 @@ package de.bstly.we.security.filter; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.lang.Nullable; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; @@ -42,8 +42,8 @@ public class FormSecondFactorAuthenticationFilter extends AbstractAuthentication /* * @see org.springframework.security.web.authentication. - * AbstractAuthenticationProcessingFilter#attemptAuthentication(javax.servlet. - * http.HttpServletRequest, javax.servlet.http.HttpServletResponse) + * AbstractAuthenticationProcessingFilter#attemptAuthentication(jakarta.servlet. + * http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse) */ @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) @@ -76,7 +76,7 @@ public class FormSecondFactorAuthenticationFilter extends AbstractAuthentication /* * @see org.springframework.security.web.authentication. * AbstractAuthenticationProcessingFilter#unsuccessfulAuthentication(javax. - * servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, + * servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.AuthenticationException) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/filter/LocalAnonymousAuthenticationFilter.java b/core/src/main/java/de/bstly/we/security/filter/LocalAnonymousAuthenticationFilter.java index 9028c00..76f21e6 100755 --- a/core/src/main/java/de/bstly/we/security/filter/LocalAnonymousAuthenticationFilter.java +++ b/core/src/main/java/de/bstly/we/security/filter/LocalAnonymousAuthenticationFilter.java @@ -5,11 +5,11 @@ package de.bstly.we.security.filter; import java.io.IOException; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -35,8 +35,8 @@ public class LocalAnonymousAuthenticationFilter extends AnonymousAuthenticationF /* * @see * org.springframework.security.web.authentication.AnonymousAuthenticationFilter - * #doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, - * javax.servlet.FilterChain) + * #doFilter(jakarta.servlet.ServletRequest, jakarta.servlet.ServletResponse, + * jakarta.servlet.FilterChain) */ @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) @@ -50,7 +50,7 @@ public class LocalAnonymousAuthenticationFilter extends AnonymousAuthenticationF /* * @see * org.springframework.security.web.authentication.AnonymousAuthenticationFilter - * #createAuthentication(javax.servlet.http.HttpServletRequest) + * #createAuthentication(jakarta.servlet.http.HttpServletRequest) */ @Override protected Authentication createAuthentication(HttpServletRequest request) { diff --git a/core/src/main/java/de/bstly/we/security/filter/RestAuthenticationFilter.java b/core/src/main/java/de/bstly/we/security/filter/RestAuthenticationFilter.java index f647681..ef951c8 100644 --- a/core/src/main/java/de/bstly/we/security/filter/RestAuthenticationFilter.java +++ b/core/src/main/java/de/bstly/we/security/filter/RestAuthenticationFilter.java @@ -5,9 +5,9 @@ package de.bstly.we.security.filter; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; import org.springframework.security.authentication.AuthenticationServiceException; @@ -45,8 +45,8 @@ public class RestAuthenticationFilter extends AbstractAuthenticationProcessingFi /* * @see org.springframework.security.web.authentication. - * AbstractAuthenticationProcessingFilter#attemptAuthentication(javax.servlet. - * http.HttpServletRequest, javax.servlet.http.HttpServletResponse) + * AbstractAuthenticationProcessingFilter#attemptAuthentication(jakarta.servlet. + * http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse) */ @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) diff --git a/core/src/main/java/de/bstly/we/security/filter/RestSecondFactorAuthenticationFilter.java b/core/src/main/java/de/bstly/we/security/filter/RestSecondFactorAuthenticationFilter.java index 05e2c14..85708a1 100644 --- a/core/src/main/java/de/bstly/we/security/filter/RestSecondFactorAuthenticationFilter.java +++ b/core/src/main/java/de/bstly/we/security/filter/RestSecondFactorAuthenticationFilter.java @@ -3,9 +3,9 @@ package de.bstly.we.security.filter; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; import org.springframework.security.authentication.AuthenticationServiceException; @@ -41,8 +41,8 @@ public class RestSecondFactorAuthenticationFilter extends FormSecondFactorAuthen /* * @see de.bstly.we.security.filter.FormSecondFactorAuthenticationFilter# - * attemptAuthentication(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse) + * attemptAuthentication(jakarta.servlet.http.HttpServletRequest, + * jakarta.servlet.http.HttpServletResponse) */ @Override public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) @@ -91,8 +91,8 @@ public class RestSecondFactorAuthenticationFilter extends FormSecondFactorAuthen /* * @see de.bstly.we.security.filter.FormSecondFactorAuthenticationFilter# - * unsuccessfulAuthentication(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse, + * unsuccessfulAuthentication(jakarta.servlet.http.HttpServletRequest, + * jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.AuthenticationException) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/handler/FormAuthenticationSuccessHandler.java b/core/src/main/java/de/bstly/we/security/handler/FormAuthenticationSuccessHandler.java index 86fafe6..ec89646 100644 --- a/core/src/main/java/de/bstly/we/security/handler/FormAuthenticationSuccessHandler.java +++ b/core/src/main/java/de/bstly/we/security/handler/FormAuthenticationSuccessHandler.java @@ -3,9 +3,9 @@ package de.bstly.we.security.handler; import java.io.IOException; import java.util.List; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.RememberMeServices; @@ -66,7 +66,7 @@ public class FormAuthenticationSuccessHandler extends SavedRequestAwareAuthentic /* * @see org.springframework.security.web.authentication. * SavedRequestAwareAuthenticationSuccessHandler#onAuthenticationSuccess(javax. - * servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, + * servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.Authentication) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationFailureHandler.java b/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationFailureHandler.java index b2a50ed..cb96981 100644 --- a/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationFailureHandler.java +++ b/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationFailureHandler.java @@ -2,9 +2,9 @@ package de.bstly.we.security.handler; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; import org.springframework.security.core.AuthenticationException; @@ -20,8 +20,8 @@ public class RestAuthenticationFailureHandler implements AuthenticationFailureHa /* * @see * org.springframework.security.web.authentication.AuthenticationFailureHandler# - * onAuthenticationFailure(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse, + * onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest, + * jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.AuthenticationException) */ @Override diff --git a/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationSuccessHandler.java b/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationSuccessHandler.java index 85f17bc..ce03fca 100644 --- a/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationSuccessHandler.java +++ b/core/src/main/java/de/bstly/we/security/handler/RestAuthenticationSuccessHandler.java @@ -2,9 +2,9 @@ package de.bstly.we.security.handler; import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; import org.springframework.security.core.Authentication; @@ -31,8 +31,8 @@ public class RestAuthenticationSuccessHandler extends FormAuthenticationSuccessH /* * @see de.bstly.we.security.handler.FormAuthenticationSuccessHandler# - * onAuthenticationSuccess(javax.servlet.http.HttpServletRequest, - * javax.servlet.http.HttpServletResponse, + * onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest, + * jakarta.servlet.http.HttpServletResponse, * org.springframework.security.core.Authentication) */ @Override diff --git a/i18n/pom.xml b/i18n/pom.xml index 2386321..93303db 100644 --- a/i18n/pom.xml +++ b/i18n/pom.xml @@ -16,6 +16,14 @@ de.bstly.we webstly-core ${revision} + + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta diff --git a/i18n/src/main/java/de/bstly/we/i18n/controller/I18nController.java b/i18n/src/main/java/de/bstly/we/i18n/controller/I18nController.java index 7d6ed87..967fb74 100644 --- a/i18n/src/main/java/de/bstly/we/i18n/controller/I18nController.java +++ b/i18n/src/main/java/de/bstly/we/i18n/controller/I18nController.java @@ -6,7 +6,7 @@ package de.bstly.we.i18n.controller; import java.io.IOException; import java.util.List; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; diff --git a/i18n/src/main/java/de/bstly/we/i18n/model/I18n.java b/i18n/src/main/java/de/bstly/we/i18n/model/I18n.java index 21310cf..61e8e4a 100644 --- a/i18n/src/main/java/de/bstly/we/i18n/model/I18n.java +++ b/i18n/src/main/java/de/bstly/we/i18n/model/I18n.java @@ -3,12 +3,12 @@ */ package de.bstly.we.i18n.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; /** * The Class I18n. diff --git a/invite/pom.xml b/invite/pom.xml index 55436da..8ae4cac 100755 --- a/invite/pom.xml +++ b/invite/pom.xml @@ -16,6 +16,14 @@ de.bstly.we webstly-core ${revision} + + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta diff --git a/invite/src/main/java/de/bstly/we/invite/model/Invite.java b/invite/src/main/java/de/bstly/we/invite/model/Invite.java index 3fac4fb..5a5a2cc 100644 --- a/invite/src/main/java/de/bstly/we/invite/model/Invite.java +++ b/invite/src/main/java/de/bstly/we/invite/model/Invite.java @@ -5,13 +5,13 @@ package de.bstly.we.invite.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; import de.bstly.we.model.UserData; diff --git a/invite/src/main/java/de/bstly/we/invite/model/InviteMapping.java b/invite/src/main/java/de/bstly/we/invite/model/InviteMapping.java index 5d6dd81..1955ff0 100644 --- a/invite/src/main/java/de/bstly/we/invite/model/InviteMapping.java +++ b/invite/src/main/java/de/bstly/we/invite/model/InviteMapping.java @@ -5,10 +5,10 @@ package de.bstly.we.invite.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class InviteMapping. diff --git a/jitsi/pom.xml b/jitsi/pom.xml index 85570a6..32b064a 100755 --- a/jitsi/pom.xml +++ b/jitsi/pom.xml @@ -26,7 +26,15 @@ com.nimbusds nimbus-jose-jwt - 9.21 + ${nimbus.version} + + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta diff --git a/jitsi/src/main/java/de/bstly/we/jitsi/model/JitsiRoom.java b/jitsi/src/main/java/de/bstly/we/jitsi/model/JitsiRoom.java index 8b249e5..b9b7577 100644 --- a/jitsi/src/main/java/de/bstly/we/jitsi/model/JitsiRoom.java +++ b/jitsi/src/main/java/de/bstly/we/jitsi/model/JitsiRoom.java @@ -5,13 +5,13 @@ package de.bstly.we.jitsi.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; import org.springframework.data.annotation.Reference; diff --git a/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxController.java b/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxController.java index 1a59922..28b6aaf 100644 --- a/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxController.java +++ b/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxController.java @@ -10,7 +10,7 @@ import java.time.temporal.ChronoUnit; import java.util.Map; import java.util.Optional; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxManagementController.java b/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxManagementController.java index 9483d5e..8a276a0 100644 --- a/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxManagementController.java +++ b/jukebox/src/main/java/de/bstly/we/jukebox/controller/JukeboxManagementController.java @@ -6,7 +6,7 @@ package de.bstly.we.jukebox.controller; import java.io.IOException; import java.util.Optional; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; diff --git a/jwt/pom.xml b/jwt/pom.xml index dcb7919..997b5da 100644 --- a/jwt/pom.xml +++ b/jwt/pom.xml @@ -21,7 +21,16 @@ com.nimbusds nimbus-jose-jwt - 9.21 + ${nimbus.version} + + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + provided - + \ No newline at end of file diff --git a/jwt/src/main/java/de/bstly/we/jwt/businesslogic/JwtKeyManager.java b/jwt/src/main/java/de/bstly/we/jwt/businesslogic/JwtKeyManager.java index b54364a..b5e1bd8 100644 --- a/jwt/src/main/java/de/bstly/we/jwt/businesslogic/JwtKeyManager.java +++ b/jwt/src/main/java/de/bstly/we/jwt/businesslogic/JwtKeyManager.java @@ -9,7 +9,7 @@ import java.time.temporal.ChronoUnit; import java.util.List; import java.util.UUID; -import javax.transaction.Transactional; +import jakarta.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; diff --git a/jwt/src/main/java/de/bstly/we/jwt/controller/JwtUserDataController.java b/jwt/src/main/java/de/bstly/we/jwt/controller/JwtUserDataController.java index 03fef93..2cd154d 100644 --- a/jwt/src/main/java/de/bstly/we/jwt/controller/JwtUserDataController.java +++ b/jwt/src/main/java/de/bstly/we/jwt/controller/JwtUserDataController.java @@ -5,8 +5,8 @@ package de.bstly.we.jwt.controller; import java.text.ParseException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/jwt/src/main/java/de/bstly/we/jwt/model/JwtKey.java b/jwt/src/main/java/de/bstly/we/jwt/model/JwtKey.java index cc8a559..ab81b6e 100644 --- a/jwt/src/main/java/de/bstly/we/jwt/model/JwtKey.java +++ b/jwt/src/main/java/de/bstly/we/jwt/model/JwtKey.java @@ -5,13 +5,13 @@ package de.bstly.we.jwt.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; import com.nimbusds.jose.JWSAlgorithm; import com.nimbusds.jose.jwk.Curve; @@ -33,8 +33,7 @@ public class JwtKey { private String name; @Column(name = "key_id", nullable = true) private String keyID; - @Lob - @Column(name = "data", nullable = true) + @Column(name = "data", nullable = true, columnDefinition="LONGTEXT") private String data; @Column(name = "key_type", nullable = false) private String keyType = KeyType.EC.getValue(); diff --git a/membership/src/main/java/de/bstly/we/membership/controller/MembershipController.java b/membership/src/main/java/de/bstly/we/membership/controller/MembershipController.java index fb3f9a1..eb878cc 100644 --- a/membership/src/main/java/de/bstly/we/membership/controller/MembershipController.java +++ b/membership/src/main/java/de/bstly/we/membership/controller/MembershipController.java @@ -7,7 +7,7 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Optional; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/minetest/src/main/java/de/bstly/we/minetest/model/MinetestAccount.java b/minetest/src/main/java/de/bstly/we/minetest/model/MinetestAccount.java index 14c99d2..fdf422d 100644 --- a/minetest/src/main/java/de/bstly/we/minetest/model/MinetestAccount.java +++ b/minetest/src/main/java/de/bstly/we/minetest/model/MinetestAccount.java @@ -3,11 +3,11 @@ */ package de.bstly.we.minetest.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; import de.bstly.we.model.UserData; diff --git a/oidc/pom.xml b/oidc/pom.xml index b924ccf..f5663f5 100755 --- a/oidc/pom.xml +++ b/oidc/pom.xml @@ -17,5 +17,13 @@ webstly-jwt ${revision} + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + diff --git a/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcClientManager.java b/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcClientManager.java index bdcb359..1d931a7 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcClientManager.java +++ b/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcClientManager.java @@ -5,7 +5,7 @@ package de.bstly.we.oidc.businesslogic; import java.util.Set; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.apache.commons.lang3.RandomStringUtils; import org.springframework.beans.factory.annotation.Autowired; diff --git a/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcSessionManager.java b/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcSessionManager.java index c2ce0fd..7c07191 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcSessionManager.java +++ b/oidc/src/main/java/de/bstly/we/oidc/businesslogic/OidcSessionManager.java @@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; +import org.springframework.http.HttpStatusCode; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @@ -364,7 +365,7 @@ public class OidcSessionManager { try { response = webClient.method(HttpMethod.POST).uri(client.getBackchannelLogoutUri()) .contentType(MediaType.APPLICATION_FORM_URLENCODED).body(BodyInserters.fromFormData(formData)) - .retrieve().onStatus(HttpStatus::isError, error -> Mono.empty()).toBodilessEntity().block(); + .retrieve().onStatus(HttpStatusCode::isError, error -> Mono.empty()).toBodilessEntity().block(); } catch (Exception e) { logger.warn("backchannelLogout POST '" + client.getBackchannelLogoutUri() + "' failed", e); } diff --git a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcAuthorizationController.java b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcAuthorizationController.java index 9d4f2d6..40e015b 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcAuthorizationController.java +++ b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcAuthorizationController.java @@ -8,8 +8,8 @@ import java.net.URI; import java.util.List; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcDiscoveryController.java b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcDiscoveryController.java index 8a0b870..10943be 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcDiscoveryController.java +++ b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcDiscoveryController.java @@ -6,8 +6,8 @@ package de.bstly.we.oidc.controller; import java.net.URI; import java.net.URISyntaxException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcSessionController.java b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcSessionController.java index 3fb8921..6777eb6 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcSessionController.java +++ b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcSessionController.java @@ -8,8 +8,8 @@ import java.util.List; import java.util.Map; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcTokenController.java b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcTokenController.java index 9dd73a7..9b106d6 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/controller/OidcTokenController.java +++ b/oidc/src/main/java/de/bstly/we/oidc/controller/OidcTokenController.java @@ -9,9 +9,9 @@ import java.time.Instant; import java.util.Base64; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.transaction.Transactional; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.transaction.Transactional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/oidc/src/main/java/de/bstly/we/oidc/model/OidcAuthorization.java b/oidc/src/main/java/de/bstly/we/oidc/model/OidcAuthorization.java index 702c4ca..38ad810 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/model/OidcAuthorization.java +++ b/oidc/src/main/java/de/bstly/we/oidc/model/OidcAuthorization.java @@ -5,14 +5,14 @@ package de.bstly.we.oidc.model; import java.util.Set; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/oidc/src/main/java/de/bstly/we/oidc/model/OidcClient.java b/oidc/src/main/java/de/bstly/we/oidc/model/OidcClient.java index a31bf75..4702dcb 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/model/OidcClient.java +++ b/oidc/src/main/java/de/bstly/we/oidc/model/OidcClient.java @@ -5,16 +5,16 @@ package de.bstly.we.oidc.model; import java.util.Set; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/oidc/src/main/java/de/bstly/we/oidc/model/OidcSession.java b/oidc/src/main/java/de/bstly/we/oidc/model/OidcSession.java index d915c8b..edd7ab2 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/model/OidcSession.java +++ b/oidc/src/main/java/de/bstly/we/oidc/model/OidcSession.java @@ -3,12 +3,12 @@ */ package de.bstly.we.oidc.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** * The Class OidcSession. diff --git a/oidc/src/main/java/de/bstly/we/oidc/model/OidcToken.java b/oidc/src/main/java/de/bstly/we/oidc/model/OidcToken.java index d000d39..1ed8a1c 100644 --- a/oidc/src/main/java/de/bstly/we/oidc/model/OidcToken.java +++ b/oidc/src/main/java/de/bstly/we/oidc/model/OidcToken.java @@ -6,13 +6,13 @@ package de.bstly.we.oidc.model; import java.time.Instant; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/partey/pom.xml b/partey/pom.xml index 6b62a16..dc16a6f 100755 --- a/partey/pom.xml +++ b/partey/pom.xml @@ -27,5 +27,13 @@ webstly-i18n ${revision} + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/DebugController.java b/partey/src/main/java/de/bstly/we/partey/api/controller/DebugController.java index 218186c..2072cfc 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/DebugController.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/DebugController.java @@ -5,8 +5,8 @@ package de.bstly.we.partey.api.controller; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/MapController.java b/partey/src/main/java/de/bstly/we/partey/api/controller/MapController.java index 79330db..c35cf11 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/MapController.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/MapController.java @@ -5,8 +5,8 @@ package de.bstly.we.partey.api.controller; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/ReportController.java b/partey/src/main/java/de/bstly/we/partey/api/controller/ReportController.java index 56513d0..a146543 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/ReportController.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/ReportController.java @@ -3,7 +3,7 @@ */ package de.bstly.we.partey.api.controller; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/RoomController.java b/partey/src/main/java/de/bstly/we/partey/api/controller/RoomController.java index 9984331..e5bcc53 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/RoomController.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/RoomController.java @@ -6,7 +6,7 @@ package de.bstly.we.partey.api.controller; import java.util.List; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/WokaController.java b/partey/src/main/java/de/bstly/we/partey/api/controller/WokaController.java index a77a5c3..d0bc95c 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/WokaController.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/WokaController.java @@ -6,7 +6,7 @@ package de.bstly.we.partey.api.controller; import java.util.Map; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; diff --git a/partey/src/main/java/de/bstly/we/partey/api/controller/support/DebugLogger.java b/partey/src/main/java/de/bstly/we/partey/api/controller/support/DebugLogger.java index 5b9b59b..4618644 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/controller/support/DebugLogger.java +++ b/partey/src/main/java/de/bstly/we/partey/api/controller/support/DebugLogger.java @@ -6,7 +6,7 @@ package de.bstly.we.partey.api.controller.support; import java.util.Iterator; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/partey/src/main/java/de/bstly/we/partey/api/security/ParteyApiAuthentication.java b/partey/src/main/java/de/bstly/we/partey/api/security/ParteyApiAuthentication.java index 3066877..5b4cb0a 100644 --- a/partey/src/main/java/de/bstly/we/partey/api/security/ParteyApiAuthentication.java +++ b/partey/src/main/java/de/bstly/we/partey/api/security/ParteyApiAuthentication.java @@ -3,7 +3,7 @@ */ package de.bstly.we.partey.api.security; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/partey/src/main/java/de/bstly/we/partey/businesslogic/ParteyMapManager.java b/partey/src/main/java/de/bstly/we/partey/businesslogic/ParteyMapManager.java index 29a4814..6340f46 100644 --- a/partey/src/main/java/de/bstly/we/partey/businesslogic/ParteyMapManager.java +++ b/partey/src/main/java/de/bstly/we/partey/businesslogic/ParteyMapManager.java @@ -8,7 +8,7 @@ import java.net.URISyntaxException; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; diff --git a/partey/src/main/java/de/bstly/we/partey/model/ParteyMap.java b/partey/src/main/java/de/bstly/we/partey/model/ParteyMap.java index 4a6f7e1..15f4848 100644 --- a/partey/src/main/java/de/bstly/we/partey/model/ParteyMap.java +++ b/partey/src/main/java/de/bstly/we/partey/model/ParteyMap.java @@ -5,13 +5,13 @@ package de.bstly.we.partey.model; import java.util.List; -import javax.persistence.CollectionTable; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReport.java b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReport.java index 37bffd2..abf7049 100644 --- a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReport.java +++ b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReport.java @@ -5,12 +5,12 @@ package de.bstly.we.partey.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; /** * The Class ParteyUserReport. diff --git a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReportModerator.java b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReportModerator.java index d92e7ee..666325c 100644 --- a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReportModerator.java +++ b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserReportModerator.java @@ -3,11 +3,11 @@ */ package de.bstly.we.partey.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; /** * The Class ParteyUserReportModerator. diff --git a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTag.java b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTag.java index f5698c9..545a3e6 100644 --- a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTag.java +++ b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTag.java @@ -6,11 +6,11 @@ package de.bstly.we.partey.model; import java.io.Serializable; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.IdClass; -import javax.persistence.Table; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.IdClass; +import jakarta.persistence.Table; import de.bstly.we.model.UserData; import de.bstly.we.partey.model.ParteyUserTag.ParteyUserTagId; diff --git a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTextures.java b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTextures.java index d9b5a36..22d098d 100644 --- a/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTextures.java +++ b/partey/src/main/java/de/bstly/we/partey/model/ParteyUserTextures.java @@ -5,12 +5,12 @@ package de.bstly.we.partey.model; import java.util.List; -import javax.persistence.CollectionTable; -import javax.persistence.Column; -import javax.persistence.ElementCollection; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.CollectionTable; +import jakarta.persistence.Column; +import jakarta.persistence.ElementCollection; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; import org.hibernate.annotations.LazyCollection; import org.hibernate.annotations.LazyCollectionOption; diff --git a/partey/src/main/java/de/bstly/we/partey/timeslot/model/Timeslot.java b/partey/src/main/java/de/bstly/we/partey/timeslot/model/Timeslot.java index 0b16d1c..a95ba23 100644 --- a/partey/src/main/java/de/bstly/we/partey/timeslot/model/Timeslot.java +++ b/partey/src/main/java/de/bstly/we/partey/timeslot/model/Timeslot.java @@ -5,16 +5,16 @@ package de.bstly.we.partey.timeslot.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import de.bstly.we.model.UserData; import de.bstly.we.model.Visibility; diff --git a/pom.xml b/pom.xml index 0ee7b82..63bc885 100755 --- a/pom.xml +++ b/pom.xml @@ -11,15 +11,17 @@ UTF-8 - 11 - 2.20.0 - 2.0.6-SNAPSHOT + 17 + 5.0.0 + 9.37.1 + 6.4.0.Final + 3.0.0-SNAPSHOT org.springframework.boot spring-boot-starter-parent - 2.7.9 + 3.2.0 @@ -41,25 +43,4 @@ urlshortener wireguard - - - - - com.mysema.maven - apt-maven-plugin - 1.1.3 - - - - process - - - target/generated-sources/java - com.querydsl.apt.jpa.JPAAnnotationProcessor - - - - - - - + \ No newline at end of file diff --git a/services/pom.xml b/services/pom.xml index 2d9f9d9..ba53727 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -22,5 +22,13 @@ webstly-oidc ${revision} + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + diff --git a/services/src/main/java/de/bstly/we/services/model/Service.java b/services/src/main/java/de/bstly/we/services/model/Service.java index f41f450..59f8ab5 100644 --- a/services/src/main/java/de/bstly/we/services/model/Service.java +++ b/services/src/main/java/de/bstly/we/services/model/Service.java @@ -3,11 +3,11 @@ */ package de.bstly.we.services.model; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; /** * The Class Service. diff --git a/urlshortener/pom.xml b/urlshortener/pom.xml index 8f302ce..251617b 100755 --- a/urlshortener/pom.xml +++ b/urlshortener/pom.xml @@ -17,5 +17,13 @@ webstly-core ${revision} + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta + diff --git a/urlshortener/src/main/java/de/bstly/we/urlshortener/controller/ShortenedUrlController.java b/urlshortener/src/main/java/de/bstly/we/urlshortener/controller/ShortenedUrlController.java index efd925a..91c4814 100644 --- a/urlshortener/src/main/java/de/bstly/we/urlshortener/controller/ShortenedUrlController.java +++ b/urlshortener/src/main/java/de/bstly/we/urlshortener/controller/ShortenedUrlController.java @@ -8,8 +8,8 @@ import java.net.URI; import java.net.URISyntaxException; import java.util.Optional; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; diff --git a/urlshortener/src/main/java/de/bstly/we/urlshortener/model/ShortenedUrl.java b/urlshortener/src/main/java/de/bstly/we/urlshortener/model/ShortenedUrl.java index 561aab5..e5ad5a4 100644 --- a/urlshortener/src/main/java/de/bstly/we/urlshortener/model/ShortenedUrl.java +++ b/urlshortener/src/main/java/de/bstly/we/urlshortener/model/ShortenedUrl.java @@ -5,13 +5,13 @@ package de.bstly.we.urlshortener.model; import java.time.Instant; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityListeners; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.Table; -import javax.persistence.Transient; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityListeners; +import jakarta.persistence.Id; +import jakarta.persistence.Lob; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; import org.springframework.util.StringUtils; diff --git a/wireguard/pom.xml b/wireguard/pom.xml index 13b8d6b..a0c92fe 100755 --- a/wireguard/pom.xml +++ b/wireguard/pom.xml @@ -17,5 +17,13 @@ webstly-core ${revision} + + + + com.querydsl + querydsl-apt + ${querydsl.version} + jakarta +