diff --git a/.gitignore b/.gitignore index 10eadf4..9721260 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,34 @@ -/target/ -.settings/ -.classpath -.project -*.class +# Eclipse-spezifische Metadaten (WICHTIG) +.metadata/ +.plugins/ bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.project +.classpath +.factorypath + +# Maven (Spring Boot Standard) +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.restoreBackup +.releaseBackup +release.properties + +# Logs +*.log +logs/ + +# Betriebssystem-Müll +.DS_Store +Thumbs.db + +# Private Konfigurationen (falls du Passwörter hier speicherst) +application-local.properties diff --git a/.metadata/.log b/.metadata/.log index d00e9f1..6213a02 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -519,3 +519,24 @@ Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp !MESSAGE Warnings while parsing the commands from the 'org.eclipse.ui.commands' and 'org.eclipse.ui.actionDefinitions' extension points. !SUBENTRY 1 org.eclipse.ui 2 0 2026-03-01 19:35:42.071 !MESSAGE Commands should really have a category: plug-in='org.springframework.tooling.boot.ls', id='spring.initializr.addStarters', categoryId='org.eclipse.lsp4e.commandCategory' + +!ENTRY org.eclipse.jface 2 0 2026-03-01 19:57:46.028 +!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation. +!SUBENTRY 1 org.eclipse.jface 2 0 2026-03-01 19:57:46.028 +!MESSAGE A conflict occurred for CTRL+SHIFT+T: +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type, + Open a type in a Java editor, + Category(org.eclipse.ui.category.navigate,Navigate,null,true), + WorkbenchHandlerServiceHandler("org.eclipse.jdt.ui.navigate.open.type"), + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) +Binding(CTRL+SHIFT+T, + ParameterizedCommand(Command(org.eclipse.lsp4e.symbolInWorkspace,Go to Symbol in Workspace, + , + Category(org.eclipse.lsp4e.category,Language Servers,null,true), + WorkbenchHandlerServiceHandler("org.eclipse.lsp4e.symbolInWorkspace"), + ,,true),null), + org.eclipse.ui.defaultAcceleratorConfiguration, + org.eclipse.ui.contexts.window,,,system) diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap index 91d6c54..4eb4941 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap index 91d6c54..4eb4941 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/7/b9/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/7/b9/history.index index 949f3e0..07f4b7a 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/7/b9/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/7/b9/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/e4/b9/db/history.index b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/e4/b9/db/history.index index f29d57a..e10b957 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/e4/b9/db/history.index and b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.indexes/e4/b9/db/history.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.markers.snap index 91d6c54..2592bda 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.syncinfo.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.syncinfo.snap index 91d6c54..4eb4941 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.syncinfo.snap and b/.metadata/.plugins/org.eclipse.core.resources/.projects/xxxthegame/.syncinfo.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index 849d585..f65c9cf 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap index 91d6c54..d5d102d 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap and b/.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/2.snap b/.metadata/.plugins/org.eclipse.core.resources/2.snap index 516aede..25eb5a5 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/2.snap and b/.metadata/.plugins/org.eclipse.core.resources/2.snap differ diff --git a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi index d8889eb..30276dd 100644 --- a/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi +++ b/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi @@ -1,8 +1,8 @@ - - + + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration - + @@ -11,9 +11,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation persp.actionSet:org.eclipse.ui.cheatsheets.actionSet @@ -74,2484 +74,2683 @@ persp.newWizSC:org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard persp.actionSet:org.eclipse.jdt.junit.JUnitActionSet persp.viewSC:org.eclipse.ant.ui.views.AntView + persp.actionSet:org.springsource.ide.eclipse.commons.launch.actionSet persp.editorOnboardingImageUri:platform:/plugin/org.eclipse.jdt.ui/$nl$/icons/full/onboarding_jperspective.svg persp.editorOnboardingText:Open a file or drop files here to open them. persp.editorOnboardingCommand:Find Actions$$$Ctrl+3 persp.editorOnboardingCommand:Show Key Assist$$$Shift+Ctrl+L persp.editorOnboardingCommand:New$$$Ctrl+N persp.editorOnboardingCommand:Open Type$$$Shift+Ctrl+T - - - + + + org.eclipse.e4.primaryNavigationStack - active - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - - + + View categoryTag:Git - - - - + + + + org.eclipse.e4.secondaryNavigationStack - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Mylyn - + View categoryTag:Java - + View categoryTag:Ant - + org.eclipse.e4.secondaryDataStack Gradle - + Oomph + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Terminal - + View categoryTag:Gradle - + View categoryTag:Gradle + + View + categoryTag:Oomph + NoRestore + - - + + View categoryTag:Help - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:Help - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + EditorStack org.eclipse.e4.primaryDataStack - - + active + + + Editor + removeOnHide + org.eclipse.jdt.ui.CompilationUnitEditor + active + + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - - Editor - removeOnHide - org.eclipse.ui.genericeditor.GenericEditor - - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.CompilationUnitEditor - - - - Editor - removeOnHide - org.eclipse.jdt.ui.PropertiesFileEditor - - - + + Editor removeOnHide org.eclipse.jdt.ui.CompilationUnitEditor - + - + View categoryTag:Java - active - activeOnClose - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:Java - + View categoryTag:Java - + + View categoryTag:General + + ViewMenu + menuContribution:menu + + - + + View categoryTag:General + + ViewMenu + menuContribution:menu + + - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Mylyn - + View categoryTag:Terminal - + View categoryTag:Java - + View categoryTag:Git - + View categoryTag:Java - + View categoryTag:Ant - + View categoryTag:Gradle - + ViewMenu menuContribution:menu - + - + View categoryTag:Gradle - + ViewMenu menuContribution:menu - + - - + + + + + View + categoryTag:Oomph + NoRestore + + ViewMenu + menuContribution:menu + + + + + toolbarSeparator - + - + Draggable - + - + toolbarSeparator - + - + Draggable - - + + - + toolbarSeparator - + - + Draggable - + Draggable - + Draggable - + Draggable - + toolbarSeparator - + - + Draggable - + - - toolbarSeparator - - - - toolbarSeparator - - - + Draggable - + + toolbarSeparator + + + + toolbarSeparator + + + + Draggable + + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + + TrimStack + Draggable + + + TrimStack + Draggable + + + + + TrimStack + Draggable + + + TrimStack + Draggable + + TrimStack Draggable - - - - - - - - - - - - - - + + + + + + + + + + + + + platform:gtk - - - - + + + + platform:gtk - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - + + + + + + + + + - - + + - - - + + + - - - - - + + + + + - - + + - - - + + + - - - + + + - - - - - - - - + + + + + + + + platform:gtk - - - - - + + + + + - - + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - - + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - + + + + - - + + - - + + - - - + + + - - + + - - + + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor removeOnHide - + View categoryTag:Ant - + View categoryTag:Gradle - + View categoryTag:Gradle - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git NoRestore - + View categoryTag:Git - + View categoryTag:Help - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java - + View categoryTag:General - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Language Servers - + View categoryTag:Language Servers - + View categoryTag:Language Servers - + View categoryTag:Maven - + View categoryTag:Maven - + View categoryTag:Maven - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Oomph - + View categoryTag:Oomph NoRestore - + View categoryTag:Plug-in Development - + View categoryTag:General - + View categoryTag:Version Control (Team) - + View categoryTag:Version Control (Team) - + View categoryTag:Terminal - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - - + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Docker + + + + + View + categoryTag:Other + + + + + View + categoryTag:Other + + + + + View + categoryTag:Other + + + glue move_after:PerspectiveSpacer SHOW_RESTORE_MENU - + move_after:Spacer Glue HIDEABLE SHOW_RESTORE_MENU - + glue move_after:SearchField SHOW_RESTORE_MENU - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - + + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index b/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index index 282fd91..8494320 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index and b/.metadata/.plugins/org.eclipse.jdt.core/1865797976.index differ diff --git a/.metadata/.plugins/org.eclipse.jdt.core/9341915.index b/.metadata/.plugins/org.eclipse.jdt.core/9341915.index index 1cbb82e..86141c1 100644 Binary files a/.metadata/.plugins/org.eclipse.jdt.core/9341915.index and b/.metadata/.plugins/org.eclipse.jdt.core/9341915.index differ diff --git a/xxxthegame/build.gradle.kts b/xxxthegame/build.gradle.kts index 2532a3f..8a04e09 100644 --- a/xxxthegame/build.gradle.kts +++ b/xxxthegame/build.gradle.kts @@ -31,6 +31,10 @@ dependencies { testRuntimeOnly("com.h2database:h2") } +tasks.withType { + options.compilerArgs.add("-parameters") +} + tasks.withType { useJUnitPlatform() } diff --git a/xxxthegame/src/main/java/de/oaa/xxx/aufgaben/controller/SperreController.java b/xxxthegame/src/main/java/de/oaa/xxx/aufgaben/controller/SperreController.java index 7f939ab..e5102b8 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/aufgaben/controller/SperreController.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/aufgaben/controller/SperreController.java @@ -20,7 +20,7 @@ import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import java.util.UUID; -@RestController +@RestController("aufgabenSperreController") @RequestMapping("/sperre") @Transactional public class SperreController { diff --git a/xxxthegame/src/main/java/de/oaa/xxx/config/JwtAuthenticationFilter.java b/xxxthegame/src/main/java/de/oaa/xxx/config/JwtAuthenticationFilter.java deleted file mode 100644 index 64beaa8..0000000 --- a/xxxthegame/src/main/java/de/oaa/xxx/config/JwtAuthenticationFilter.java +++ /dev/null @@ -1,41 +0,0 @@ -package de.oaa.xxx.config; - -import io.jsonwebtoken.Claims; -import jakarta.servlet.FilterChain; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.web.filter.OncePerRequestFilter; - -import java.io.IOException; -import java.util.Collections; -import java.util.UUID; - -public class JwtAuthenticationFilter extends OncePerRequestFilter { - - private final JwtService jwtService; - - public JwtAuthenticationFilter(JwtService jwtService) { - this.jwtService = jwtService; - } - - @Override - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) - throws ServletException, IOException { - String token = request.getHeader("token"); - if (token != null && !token.isBlank()) { - String clientIp = request.getRemoteAddr(); - Claims claims = jwtService.validateToken(token, clientIp); - if (claims != null) { - String userIdStr = claims.get("userId", String.class); - UUID userId = UUID.fromString(userIdStr); - UsernamePasswordAuthenticationToken authentication = - new UsernamePasswordAuthenticationToken(userId, null, Collections.emptyList()); - SecurityContextHolder.getContext().setAuthentication(authentication); - } - } - filterChain.doFilter(request, response); - } -} diff --git a/xxxthegame/src/main/java/de/oaa/xxx/config/JwtService.java b/xxxthegame/src/main/java/de/oaa/xxx/config/JwtService.java deleted file mode 100644 index 46ab835..0000000 --- a/xxxthegame/src/main/java/de/oaa/xxx/config/JwtService.java +++ /dev/null @@ -1,90 +0,0 @@ -package de.oaa.xxx.config; - -import io.jsonwebtoken.Claims; -import io.jsonwebtoken.Jws; -import io.jsonwebtoken.Jwts; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import java.io.IOException; -import java.security.Key; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PublicKey; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; -import java.util.Base64; -import java.util.Date; -import java.util.UUID; - -@Service -public class JwtService { - - private static final Logger LOGGER = LoggerFactory.getLogger(JwtService.class); - - @Value("${jwt.keystore.password}") - private String keyPass; - - @Value("${jwt.keystore.alias}") - private String alias; - - private KeyStore getKeystore() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { - KeyStore keystore = KeyStore.getInstance(KeyStore.getDefaultType()); - keystore.load(getClass().getClassLoader().getResourceAsStream("xxx.jks"), keyPass.toCharArray()); - return keystore; - } - - public String createToken(String email, UUID userId, String clientIp) { - try { - KeyStore keystore = getKeystore(); - Key key = keystore.getKey(alias, keyPass.toCharArray()); - String token = Jwts.builder() - .issuer("OAA Games") - .issuedAt(new Date()) - .claim("email", email) - .claim("client", clientIp) - .claim("userId", userId.toString()) - .signWith(key) - .compact(); - if (LOGGER.isDebugEnabled()) { - LOGGER.debug("Erstellter token: {}", token); - } - return token; - } catch (Exception e) { - LOGGER.error("Fehler beim Erstellen des Tokens", e); - throw new RuntimeException("Token-Erstellung fehlgeschlagen", e); - } - } - - public Claims validateToken(String token, String clientIp) { - try { - KeyStore keystore = getKeystore(); - Key key = keystore.getKey(alias, keyPass.toCharArray()); - Jws claimsJws = Jwts.parser().verifyWith((java.security.PublicKey) keystore.getCertificate(alias).getPublicKey()).build().parseSignedClaims(token); - Claims claims = claimsJws.getPayload(); - String tokenClient = claims.get("client", String.class); - if (!clientIp.equals(tokenClient)) { - LOGGER.warn("IP-Adresse stimmt nicht überein: Token={}, Request={}", tokenClient, clientIp); - return null; - } - return claims; - } catch (Exception e) { - LOGGER.debug("Token-Validierung fehlgeschlagen: {}", e.getMessage()); - return null; - } - } - - public String getPublicKeyBase64() { - try { - KeyStore keystore = getKeystore(); - PublicKey publicKey = keystore.getCertificate(alias).getPublicKey(); - return Base64.getEncoder().encodeToString(publicKey.getEncoded()); - } catch (Exception e) { - LOGGER.error("Fehler beim Laden des Public Keys", e); - throw new RuntimeException("Public-Key-Laden fehlgeschlagen", e); - } - } -} diff --git a/xxxthegame/src/main/java/de/oaa/xxx/config/SecurityConfig.java b/xxxthegame/src/main/java/de/oaa/xxx/config/SecurityConfig.java index d18079f..be0e353 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/config/SecurityConfig.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/config/SecurityConfig.java @@ -8,16 +8,14 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; @Configuration @EnableWebSecurity public class SecurityConfig { - private final JwtService jwtService; + public SecurityConfig() { - public SecurityConfig(JwtService jwtService) { - this.jwtService = jwtService; } @Bean @@ -26,14 +24,23 @@ public class SecurityConfig { .csrf(AbstractHttpConfigurer::disable) .sessionManagement(sm -> sm.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) .authorizeHttpRequests(auth -> auth - .requestMatchers(HttpMethod.GET, "/login", "/login/publickey").permitAll() - .requestMatchers(HttpMethod.POST, "/user").permitAll() - .requestMatchers(HttpMethod.POST, "/registration").permitAll() - .requestMatchers(HttpMethod.GET, "/registration/activation/**").permitAll() - .requestMatchers(HttpMethod.POST, "/filler").permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/error")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/*.html")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/css/**")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/js/**")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/images/**")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher("/favicon.ico")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/login")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/login/publickey")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.POST, "/user")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/registration")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.POST, "/registration")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/activation")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.GET, "/activation/**")).permitAll() + .requestMatchers(AntPathRequestMatcher.antMatcher(HttpMethod.POST, "/filler")).permitAll() .anyRequest().authenticated() - ) - .addFilterBefore(new JwtAuthenticationFilter(jwtService), UsernamePasswordAuthenticationFilter.class); + ); return http.build(); } } diff --git a/xxxthegame/src/main/java/de/oaa/xxx/registration/ActivationController.java b/xxxthegame/src/main/java/de/oaa/xxx/registration/ActivationController.java index 3e90f81..16382f2 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/registration/ActivationController.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/registration/ActivationController.java @@ -1,18 +1,20 @@ package de.oaa.xxx.registration; -import de.oaa.xxx.user.Registration; -import de.oaa.xxx.user.UserController; +import java.net.URI; +import java.util.UUID; + import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import java.net.URI; -import java.util.UUID; +import de.oaa.xxx.user.Registration; +import de.oaa.xxx.user.UserController; + @RestController -@RequestMapping("/registration/activation") +@RequestMapping("/activation") public class ActivationController { private final RegistrationRepository registrationRepository; @@ -36,12 +38,13 @@ public class ActivationController { if (response.getStatusCode().is2xxSuccessful()) { registration.setActivated(Boolean.TRUE); registrationRepository.save(registration); - return ResponseEntity.status(302).location(URI.create("/activation.html")).build(); + String redirect = "/login.html?email=" + java.net.URLEncoder.encode(registration.getEmail(), java.nio.charset.StandardCharsets.UTF_8); + return ResponseEntity.status(302).location(URI.create(redirect)).build(); } else { return ResponseEntity.internalServerError().build(); } } else { return ResponseEntity.noContent().build(); } - } + } } diff --git a/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationController.java b/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationController.java index 10f7e33..9e92de8 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationController.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationController.java @@ -1,33 +1,43 @@ package de.oaa.xxx.registration; -import de.oaa.xxx.mail.Email; -import de.oaa.xxx.mail.MailService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import de.oaa.xxx.mail.Email; +import de.oaa.xxx.mail.MailService; +import de.oaa.xxx.user.UserRepository; + @RestController @RequestMapping("/registration") public class RegistrationController { private static final Logger LOGGER = LoggerFactory.getLogger(RegistrationController.class); + @Value("${app.base-url:http://localhost:8080}") + private String baseUrl; + private final RegistrationRepository registrationRepository; + private final UserRepository userRepository; private final MailService mailService; - public RegistrationController(RegistrationRepository registrationRepository, MailService mailService) { + public RegistrationController(RegistrationRepository registrationRepository, UserRepository userRepository, + MailService mailService) { this.registrationRepository = registrationRepository; + this.userRepository = userRepository; this.mailService = mailService; } @PostMapping - public ResponseEntity create(@RequestBody Registration registration) { + public ResponseEntity create(@RequestBody Registration registration) { LOGGER.info("POST {}: {}", getClass().getName(), registration); - if (!registrationRepository.findByEmail(registration.getEmail()).isEmpty()) { + if (registrationRepository.findByEmail(registration.getEmail()).isPresent() + || userRepository.findByEmail(registration.getEmail()).isPresent()) { LOGGER.warn("User mit E-Mail {} bereits vorhanden", registration.getEmail()); return ResponseEntity.badRequest().build(); } @@ -44,16 +54,23 @@ public class RegistrationController { registrationRepository.delete(entity); return ResponseEntity.internalServerError().build(); } - return ResponseEntity.accepted().build(); + return ResponseEntity.status(202).build(); } private String getMailText(Registration registration) { + String uuid = registration.getId().toString(); return """

Moin %s

Vielen Dank für deine Anmeldung bei XXX-BDSM Game!

-

Klicke hier um deine E-Mail-Adresse zu bestätigen.

-

Und nun viel Spass beim Spiel!

- """.formatted(registration.getName(), registration.getId().toString()); +

Klicke hier um deine E-Mail-Adresse zu bestätigen.

+
+

+ Falls der Link nicht funktioniert, kannst du deine E-Mail-Adresse auch manuell bestätigen.
+ Öffne dazu %s/activate.html und gib folgenden Code ein: +

+

%s

+

Viel Spaß beim Spiel!

+ """.formatted(registration.getName(), baseUrl, uuid, baseUrl, baseUrl, uuid); } } diff --git a/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationRepository.java b/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationRepository.java index f4ace73..a40aedc 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationRepository.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/registration/RegistrationRepository.java @@ -2,10 +2,10 @@ package de.oaa.xxx.registration; import org.springframework.data.jpa.repository.JpaRepository; -import java.util.List; +import java.util.Optional; import java.util.UUID; public interface RegistrationRepository extends JpaRepository { - List findByEmail(String email); + Optional findByEmail(String email); } diff --git a/xxxthegame/src/main/java/de/oaa/xxx/session/controller/SperreController.java b/xxxthegame/src/main/java/de/oaa/xxx/session/controller/SperreController.java index 03c089b..144af24 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/session/controller/SperreController.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/session/controller/SperreController.java @@ -22,7 +22,7 @@ import java.time.LocalDateTime; import java.util.List; import java.util.UUID; -@RestController +@RestController("sessionSperreController") @RequestMapping("/session/sperre") @Transactional public class SperreController { diff --git a/xxxthegame/src/main/java/de/oaa/xxx/user/LoginController.java b/xxxthegame/src/main/java/de/oaa/xxx/user/LoginController.java index 22eff14..0096d5d 100644 --- a/xxxthegame/src/main/java/de/oaa/xxx/user/LoginController.java +++ b/xxxthegame/src/main/java/de/oaa/xxx/user/LoginController.java @@ -1,7 +1,8 @@ package de.oaa.xxx.user; -import de.oaa.xxx.config.JwtService; -import jakarta.servlet.http.HttpServletRequest; +import java.util.Optional; +import java.util.UUID; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; @@ -11,8 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import java.util.Optional; -import java.util.UUID; +import jakarta.servlet.http.HttpServletRequest; @RestController @RequestMapping("/login") @@ -21,21 +21,18 @@ public class LoginController { private static final Logger LOGGER = LoggerFactory.getLogger(LoginController.class); private final UserRepository userRepository; - private final JwtService jwtService; - public LoginController(UserRepository userRepository, JwtService jwtService) { + public LoginController(UserRepository userRepository) { this.userRepository = userRepository; - this.jwtService = jwtService; } @GetMapping - public ResponseEntity login(@RequestParam String email, @RequestParam String hash, - HttpServletRequest req) { + public ResponseEntity login(@RequestParam String email, @RequestParam String hash, + HttpServletRequest req) { Optional user = userRepository.findByEmailAndPassword(email, hash); if (user.isPresent()) { LOGGER.info("User erfolgreich angemeldet: {}", email); - String token = jwtService.createToken(email, user.get().getUserId(), req.getRemoteAddr()); - return ResponseEntity.ok(token); + return ResponseEntity.ok(user.get().toUser()); } else { return ResponseEntity.noContent().build(); } @@ -47,9 +44,4 @@ public class LoginController { .map(entity -> ResponseEntity.ok(entity.toUser())) .orElse(ResponseEntity.noContent().build()); } - - @GetMapping("/publickey") - public ResponseEntity getPublicKey() { - return ResponseEntity.ok(jwtService.getPublicKeyBase64()); - } } diff --git a/xxxthegame/src/main/resources/application.properties b/xxxthegame/src/main/resources/application.properties index 7f7c2cf..6cbc71c 100644 --- a/xxxthegame/src/main/resources/application.properties +++ b/xxxthegame/src/main/resources/application.properties @@ -11,10 +11,18 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect spring.jpa.properties.hibernate.type.preferred_uuid_jdbc_type=VARCHAR # Mail -spring.mail.host=${MAIL_HOST:localhost} -spring.mail.port=${MAIL_PORT:25} -spring.mail.username=${MAIL_USER:} -spring.mail.password=${MAIL_PASSWORD:} +#spring.mail.host=${MAIL_HOST:localhost} +#spring.mail.port=${MAIL_PORT:25} +#spring.mail.username=${MAIL_USER:} +#spring.mail.password=${MAIL_PASSWORD:} +#spring.mail.properties.mail.smtp.auth=false +#spring.mail.properties.mail.smtp.starttls.enable=false + +# Mailpit +spring.mail.host=localhost +spring.mail.port=1025 +spring.mail.username= +spring.mail.password= spring.mail.properties.mail.smtp.auth=false spring.mail.properties.mail.smtp.starttls.enable=false @@ -25,3 +33,4 @@ jwt.keystore.alias=xxx # Server server.port=8080 +server.servlet.context-path=/ diff --git a/xxxthegame/src/main/resources/static/activate.html b/xxxthegame/src/main/resources/static/activate.html new file mode 100644 index 0000000..767671d --- /dev/null +++ b/xxxthegame/src/main/resources/static/activate.html @@ -0,0 +1,92 @@ + + + + + + XXX The Game – Aktivierung + + + +
+

XXX The Game

+

E-Mail-Adresse bestätigen

+ +

+ Du hast eine E-Mail mit einem Aktivierungslink erhalten.
+ Falls der Link nicht funktioniert, gib hier deinen Aktivierungscode ein. +

+ + + + + + +
+
+ + + + diff --git a/xxxthegame/src/main/resources/static/css/style.css b/xxxthegame/src/main/resources/static/css/style.css new file mode 100644 index 0000000..718da63 --- /dev/null +++ b/xxxthegame/src/main/resources/static/css/style.css @@ -0,0 +1,163 @@ +/* ── Reset ── */ +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +/* ── Base ── */ +body { + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background: #1a1a2e; + font-family: 'Segoe UI', sans-serif; + color: #eee; + gap: 2rem; +} + +h1 { + color: #e94560; +} + +p { + color: #888; + font-size: 1rem; +} + +/* ── Card ── */ +.card { + background: #16213e; + border: 1px solid #0f3460; + border-radius: 12px; + padding: 2.5rem; + width: 100%; + max-width: 380px; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); + gap: 0; +} + +.card h1 { + text-align: center; + font-size: 1.6rem; + margin-bottom: 0.25rem; +} + +.subtitle { + text-align: center; + font-size: 0.85rem; + color: #888; + margin-bottom: 2rem; +} + +/* ── Form elements ── */ +label { + display: block; + font-size: 0.8rem; + color: #aaa; + margin-bottom: 0.3rem; + margin-top: 1rem; +} + +input { + width: 100%; + padding: 0.65rem 0.9rem; + border: 1px solid #0f3460; + border-radius: 6px; + background: #0f3460; + color: #eee; + font-size: 1rem; + outline: none; + transition: border-color 0.2s; +} + +input:focus { + border-color: #e94560; +} + +/* ── Buttons ── */ +button, .btn { + display: inline-block; + padding: 0.75rem 2.5rem; + background: #e94560; + color: #fff; + border: none; + border-radius: 6px; + font-size: 1rem; + font-weight: 600; + cursor: pointer; + text-decoration: none; + transition: background 0.2s; +} + +button:hover:not(:disabled), .btn:hover { + background: #c73652; +} + +button:disabled { + opacity: 0.6; + cursor: not-allowed; +} + +button.full-width { + width: 100%; + margin-top: 1.75rem; + padding: 0.75rem; +} + +button.secondary { + background: #0f3460; + font-weight: normal; + padding: 0.3rem 0.7rem; + font-size: 0.75rem; + width: auto; + margin-top: 0.5rem; +} + +button.secondary:hover { + background: #1a4a8a; +} + +/* ── Messages ── */ +.message { + margin-top: 1.25rem; + padding: 0.65rem 0.9rem; + border-radius: 6px; + font-size: 0.85rem; + display: none; + word-break: break-all; +} + +.message.error { + background: #3d0f1a; + border: 1px solid #e94560; + color: #e94560; +} + +.message.success { + background: #0f3d1a; + border: 1px solid #2ecc71; + color: #2ecc71; +} + +/* ── Token box ── */ +.token-box { + margin-top: 1.25rem; + padding: 0.65rem 0.9rem; + background: #0f1e3d; + border: 1px solid #0f3460; + border-radius: 6px; + font-size: 0.75rem; + color: #aaa; + word-break: break-all; + display: none; +} + +.token-box span { + display: block; + font-size: 0.7rem; + color: #666; + margin-bottom: 0.4rem; +} diff --git a/xxxthegame/src/main/resources/static/index.html b/xxxthegame/src/main/resources/static/index.html new file mode 100644 index 0000000..cf0f9e2 --- /dev/null +++ b/xxxthegame/src/main/resources/static/index.html @@ -0,0 +1,48 @@ + + + + + + XXX The Game + + + +

XXX The Game

+

Das Erwachsenenspiel für Paare und Gruppen

+ + +
+ + + + + + diff --git a/xxxthegame/src/main/resources/static/login.html b/xxxthegame/src/main/resources/static/login.html index e12dc08..18ec088 100644 --- a/xxxthegame/src/main/resources/static/login.html +++ b/xxxthegame/src/main/resources/static/login.html @@ -4,147 +4,7 @@ XXX The Game – Login - +
@@ -157,19 +17,21 @@ - +
- -
- JWT Token -
- -
diff --git a/xxxthegame/src/main/resources/static/registration.html b/xxxthegame/src/main/resources/static/registration.html new file mode 100644 index 0000000..e161de7 --- /dev/null +++ b/xxxthegame/src/main/resources/static/registration.html @@ -0,0 +1,111 @@ + + + + + + XXX The Game – Registrierung + + + +
+

XXX The Game

+

Neues Konto erstellen

+ + + + + + + + + + + + + + + +
+ +

+ Bereits registriert? Anmelden +

+
+ + + + diff --git a/xxxthegame/src/main/resources/static/userhome.html b/xxxthegame/src/main/resources/static/userhome.html new file mode 100644 index 0000000..97ab5f9 --- /dev/null +++ b/xxxthegame/src/main/resources/static/userhome.html @@ -0,0 +1,23 @@ + + + + + + XXX The Game + + + +

XXX The Game

+

+ + + +