Skip to content

Commit

Permalink
Vorbereitung Demo 18.09.24 (#180)
Browse files Browse the repository at this point in the history
* Bug/dave 224 belastungsplan fehler (#110)

* paramater für reportTool angepasst

* paramater für reportTool angepasst

* werte auf hundert runden ins backend verlagert

* legende map-keys angepasst

* lfw eingefügt

* belastungsplan steht als base64 zur verfügung

* größe des Belastungsplans in PX und nicht in VH

* tag hinzugefügt

* klammern bei jedem zweiten wert hinzugefügt

* Feat/dave 198 export chart als pdf (#114)

* fix speeddial

* fix var names, prepare pdf fetch

* paramater für reportTool angepasst

* paramater für reportTool angepasst

* werte auf hundert runden ins backend verlagert

* services fuer messstellen implementiert

* legende map-keys angepasst

* fix filtermenu preselect after history

* lfw eingefügt

* belastungsplan steht als base64 zur verfügung

* größe des Belastungsplans in PX und nicht in VH

* tag hinzugefügt

* klammern bei jedem zweiten wert hinzugefügt

* linter

* add Belastungsplan to report

---------

Co-authored-by: DanielOber <[email protected]>

* Refactor/dave 253 pkg zaehlstelle (#116)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* Feat/240 umstellung composition api common app (#115)

* umstellung composition api

* info-message-dto hinzugefügt

* umstellung auf composition api

* umstellung auf composition api

* umstellung auf composition api

* umstellung auf composition api

* umstellung auf composition api

* name angepasst

* files gelöscht, da nicht verwendet

* text angepasst, prop auf optional gesetzt

* Refactor/dave 254 umstellung composition api views (#117)

* umstellung composition api

* main also ausnahme für single-world-filename hinzgefügt

* umstellung auf composition api

* ZaehlstelleHeaderDTO create default hinzugefügt

* Refactor/dave 257 pkg zaehlstelle charts (#118)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* refactor reportTools.ts

* änderungen reingezogen von sprint

* merge sprint

* Refactor/dave 257 pkg zaehlstelle charts2 (#119)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* refactor reportTools.ts

* änderungen reingezogen von sprint

* heatmap auf composition Api umgestellt

* stepline auf composition Api umgestellt

* stepline auf composition Api umgestellt

* diagramme an neue stepline angepasst

* zeitreihe auf composition Api umgestellt

* listenausgabe auf composition Api umgestellt

* anmerkung eingebaut

* Refactor/dave 257 pkg zaehlstelle charts schematischeuebersicht (#120)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* refactor reportTools.ts

* änderungen reingezogen von sprint

* heatmap auf composition Api umgestellt

* stepline auf composition Api umgestellt

* stepline auf composition Api umgestellt

* diagramme an neue stepline angepasst

* zeitreihe auf composition Api umgestellt

* listenausgabe auf composition Api umgestellt

* anmerkung eingebaut

* schematischeuebersicht auf composition api umgestellt

* fix error

* Refactor/dave 257 pkg zaehlstelle charts kreisverkehr (#121)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* refactor reportTools.ts

* änderungen reingezogen von sprint

* heatmap auf composition Api umgestellt

* stepline auf composition Api umgestellt

* stepline auf composition Api umgestellt

* diagramme an neue stepline angepasst

* zeitreihe auf composition Api umgestellt

* listenausgabe auf composition Api umgestellt

* anmerkung eingebaut

* schematischeuebersicht auf composition api umgestellt

* fix error

* kreisverkehr auf composition api umgestellt

* DAVE-258 zaehlstelle icons als composition api (#123)

* icons auf composition api umgestellt

* Initialisierung des Stores mit defaultObject

* remove unused imports

* Refactor/dave 257 pkg zaehlstelle charts kreuzung (#122)

* umstellung auf composition api

* umstellung auf falsy

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* umgestellt auf composition api

* refactor reportTools.ts

* änderungen reingezogen von sprint

* heatmap auf composition Api umgestellt

* stepline auf composition Api umgestellt

* stepline auf composition Api umgestellt

* diagramme an neue stepline angepasst

* zeitreihe auf composition Api umgestellt

* listenausgabe auf composition Api umgestellt

* anmerkung eingebaut

* schematischeuebersicht auf composition api umgestellt

* fix error

* kreisverkehr auf composition api umgestellt

* kreuzung auf composition api umgestellt

* Refactor/dave 259 optionsmenue (#125)

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* Anmerkung eingebaut

* Refactor/dave 252 pdfreport (#126)

* auf composition api umgestellt

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* umgestellt auf Composition Api

* umgestellt auf composition api und reines leaflet (#128)

* Refactor/dave 238 remove unused code (#129)

* auf composition api umgestellt

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* umgestellt auf Composition Api

* umgestellt auf composition api und reines leaflet

* remove unused code
reorga types pkg

* components.d.ts neu gebaut

* fix useStore error

* Refactor/dave 261 composables (#130)

* auf composition api umgestellt

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* umgestellt auf Composition Api

* umgestellt auf composition api und reines leaflet

* remove unused code
reorga types pkg

* components.d.ts neu gebaut

* daveutils auf composable umgebaut
Alle composables unter im pkg util gesammelt

* fix useStore error

* Refactor/dave 285 app als composition api (#132)

* auf composition api umgestellt

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* umgestellt auf Composition Api

* umgestellt auf composition api und reines leaflet

* remove unused code
reorga types pkg

* components.d.ts neu gebaut

* daveutils auf composable umgebaut
Alle composables unter im pkg util gesammelt

* umgestellt auf Composition Api

* anmerkung eingebaut

* Refactor/dave 284 umstellung auf pinia (#133)

* auf composition api umgestellt

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* umgestellt auf Composition Api

* neu gebaut

* umgestellt auf Composition Api

* umgestellt auf composition api und reines leaflet

* remove unused code
reorga types pkg

* components.d.ts neu gebaut

* daveutils auf composable umgebaut
Alle composables unter im pkg util gesammelt

* add pinia

* historystore auf pinia umgestellt

* zaehlstelle.ts auf pinia umgestellt

* eventbus.ts in zaehlstelleStore integriert

* snackbar.ts auf pinia umgestellt

* umgestellt auf Composition Api

* snackbar.ts auf pinia umgestellt

* fix test

* belastungsplan.ts auf pinia umgestellt

* search.ts auf pinia umgestellt

* search.ts auf pinia umgestellt

* pdfreport.ts auf pinia umgestellt

* user.ts auf pinia umgestellt

* messstelle.ts auf pinia umgestellt

* filteroptionsMessstelle.ts in messstelle.ts integriert und auf pinia umgestellt

* belastungsplan.ts.ts in zaehlstelle.ts integriert

* filteroptions.ts in zaehlstelle.ts integriert und auf pinia umgestellt

* zaehlung.ts in zaehlstelle.ts integriert und auf pinia umgestellt

* merge sprint

* Refactor/dave 256 umstellung composition api pdf report (#134)

* umstellung auf composition api

* i18n für composition api hinzugefügt

* i18n anpassung, let zu const geändert

* i18n durch dateUtils ersetzt

* i18n composable eingefügt

* isDraggable zu draggableCard geändert

* merged sprint into branch

* Bug/dave 277 flackern bei sso timeout beheben (#138)

* flackern bei SSO-Timeout behoben

* merge sprint

* fix package-lock.json

* Bug/dave 235 zeiträume ueber 5 jahre (#137)

* fehler wenn ein zeitraum über 5 Jahre mit der Rolle anwender ausgewählt wird

* dropdown um während der entwicklung zwischen dummy-usern zu wechseln

* dropdown um während der entwicklung zwischen dummy-usern zu wechseln

* Revert "dropdown um während der entwicklung zwischen dummy-usern zu wechseln"

This reverts commit 31a3d6b.

* Revert "dropdown um während der entwicklung zwischen dummy-usern zu wechseln"

This reverts commit c1e4f62.

* fix test (#142)

* Feat/dave 168 filtersteuerung messfaehigkeit (#143)

* fehler wenn ein zeitraum über 5 Jahre mit der Rolle anwender ausgewählt wird

* dropdown um während der entwicklung zwischen dummy-usern zu wechseln

* dropdown um während der entwicklung zwischen dummy-usern zu wechseln

* Revert "dropdown um während der entwicklung zwischen dummy-usern zu wechseln"

This reverts commit 31a3d6b.

* Revert "dropdown um während der entwicklung zwischen dummy-usern zu wechseln"

This reverts commit c1e4f62.

* filtersteuerung mittels messfaehigkeit

* fahzeug- und Intervallauswahl mit Messfaehigkeit verschraenkt

* fix test

* fix test

* remove unused code

---------

Co-authored-by: DanielOber <[email protected]>

* Opensource/docker compose2 (#146)

* docker-compose created

* docker.yml added

---------

Co-authored-by: DanielOber <[email protected]>
Co-authored-by: Der-Alex-K <[email protected]>

* add .github/workflows/build_push_ghcr.yaml (#147)

* Hardcoded city areas removed (#149)

* pfeilgröße angepasst, spitzenstunde hinzugefügt (#148)

* pfeilgröße angepasst, spitzenstunde hinzugefügt

* pfeilgröße angepasst, spitzenstunde hinzugefügt

* Feat/dave 110 gesamtauswertungen berechnung (#150)

* neue typen eingeführt, anbindung ans Backend eingebaut

* fix errormessage

* Feat/dave 190 anpassung datepicker (#131)

* datum in die vergangenheit auf 2006 begrenzt

* das im textfeld eingegebene datum wird auch im datepicker angezeigt

* :art

* das tagesdatum kann nicht ausgewählt werden und ist ausgegraut

* der nutzer wird bei einer falschen eingabe darauf hingewiesen, dass das format falsch ist oder das datum nicht existiert

* datepicker zeigt immer automatisch das aktuell ausgewählte (kleinste) datum

* wenn das aufbaudatum der messstelle vor 2006 liegt ist der datepicker trotzdem auf den 01.01.2006 begrenzt

* rückmeldungen aus review eingearbeitet

* DAVE-302 DAVE-316 Hebung Frameworks Java Vue Vuetify (#156)

* hebung der dependencies, anpassen der script teile in den files

* revert linter

* fix map.value

* map umgestellt auf vue 3

* refactor plugins, App, Main, VisitHistory, InfoMessage umgestellt auf vuetify 3

* rename Main to HomeView

* add vertical stepper

* Auswertungsview + componenten umgestellt auf Vue 3

* change java files and pom

* change unit tests

* change unit tests

* change to java 21

* reset profiles

* change profile test to profile unittest

* zaehlstelleview auf vue 3 umgestellt (wip)

* GeometriePanel auf vue 3 umgestellt

* ZaehlungsvergleichPanel auf vue 3 umgestellt

* add context propagation

* DarstellungsoptionenPanel auf vue 3 umgestellt

* fix test

* fix reload

* update leaflet versions

* ZaehlstelleMap auf vue 3 umgestellt

* change pdf report

* fix tooltips

* fix tooltips

* fix tooltips

* fix tooltips

* adapt speed dial

* adapt pdf preview dialog

* fix pdf report view

* change vue dragable

* add vue draggable

* add diagramme, fix tab

* update datatable (wip)

* pdf view

* reformat code

* remove draggable

* add buttons to move asset

* remove dragability

* remove dragability

* remove dragability

* set page setting

* fix bug

* set init titles

* set init titles

* fix position speed dial

* fix speed dial

* fix bug

* reformat vuew

* remove css

* adapt dialog for deletion

* adapt title

* fix text asset form

* adapt code

* adapt code

* change heading asset form

* change data table asset

* change asset forms

* update datatable fix row color (wip)

* update datatable headers (wip)

* unify width of components

* fix takepicture of map

* fix image asset form

* fix speed dial

* fix speed dial

* gui: fix lcm pdf review

* gui: fix lcm pdf review

* remove feature of pdf preview

* reformat code

* remove key

* remove key

* reduce spaver

* Listenausgabe gehoben auf vue 3

* update belastungsplan to vue 3

* update speeddial, pdfreportmenu to vue 3

* fix speeddials with tooltips

* fix speeddial

* messstellenview auf vue 3 umstellen (wip)

* activate diagramms

* pdfreportmenu umgestellt auf vue 3

* messstelle diagramme umgestellt auf vue 3

* fix colors

* fahrzeugpanel umgestellt auf vue 3

* darstellungspanel und messquerschnittpanel umgestellt auf vue 3

* zeitpanel umgestellt auf vue 3 (wip)

* zeitpanel umgestellt auf vue 3 (wip)

* snackbar umgestellt auf vue 3

* btn und icons vereinheitlicht

* views vereinheitlicht

* code vereinheitlicht

* code vereinheitlicht

* code vereinheitlicht

* fix package-lock.json

* prettier

* remove linter for vuetify

* vix deprecated props

* vix deprecated props

* vix deprecated events

* vix deprecated color

* vix deprecated props

* vix deprecated props

* vix deprecated props

* vix geometrie panel

* vix progressloader

* Datepicker eingebaut

* fix Datepicker

* fix search bug

* fix search

* fix saveMapPosition

* Anmerkungen

* hebung spring boot

* Anmerkungen eingearbeitet

* rename test

* rename test

* change names of classes and methods

* remove class with unused constants

* Âremove unused search store

* remove unsed class with unused method

* rename utils class for validation rules

* rename ReportTools

* Anmerkungen eingearbeitet

* == to ===

* Anmerkungen eingearbeitet

* rename DaveUtils to DownloadUtils

* Anmerkungen eingearbeitet

* Anmerkungen eingearbeitet

* remove unnecessary comments in store classes

* change storename

* simplyfy code

* Anmerkungen eingearbeitet

* move composables

* Anmerkungen eingearbeitet

* adapt gitignore

* format code with npm run fix

* fix linter

* "@typescript-eslint/no-explicit-any" as "warn"

* fix linter

* add fix prettier and eslint

* update version vue-tsc

* fix datatype

* import as type

* add datatype

* add datatype

* fix lint

* fix lint

* fix linting

---------

Co-authored-by: alexander.kerscher <[email protected]>

* On push sprint (#171)

* on-push-sprint

* tag as var

* Feat/dave 346 select all (#168)

* move selectAll to the top

* fix missing buttons if screen to small

* add overflow-x

* prettier

* add Toast when adding map to Report (#169)

add loading to create Pdf button

* fix wrong toast (#173)

* Bug/dave 35 x belastungsplan (#176)

* fix DAVE-351: switch color for North and South

* fix DAVE-350: change line width

* fix DAVE-352: fix rotation for east

* switch to Himmelsrichtungen Enum

* recalculate line width

* metadata rm tags (#178)

* Bug/dave 353 belastungsplan (#177)

* fix DAVE-351: switch color for North and South

* fix DAVE-350: change line width

* fix DAVE-352: fix rotation for east

* switch to Himmelsrichtungen Enum

* recalculate line width

* fix Belastungsplan Zaehlstelle if no Fahrzeug is selected

* fix Belastungsplan Messstelle if no Fahrzeug is selected

* refactor to composable

* remove unused methods

* remove old todos

* Anmerkung eingebaut

* Refactoring (#179)

* refactor TooltipWithIcon

* remove baseicon

---------

Co-authored-by: DanielOber <[email protected]>
Co-authored-by: martind260 <[email protected]>
Co-authored-by: Klaus Mueller <[email protected]>
Co-authored-by: Viviane Johns <[email protected]>
Co-authored-by: boal <[email protected]>
  • Loading branch information
6 people authored Sep 17, 2024
1 parent a25ff90 commit 5a6d93f
Show file tree
Hide file tree
Showing 376 changed files with 30,321 additions and 36,216 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "11"
java-version: "21"
distribution: "temurin"
cache: "maven"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "11"
java-version: "21"
distribution: "temurin"
cache: "maven"

Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/build_push_ghcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: build image and push to ghcr.io

on:
push:
branches: ["main-ls2", "sprint"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
compliance:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Advance Security Policy as Code
uses: advanced-security/[email protected]
with:
policy: it-at-m/policy-as-code
policy-path: default.yaml
token: ${{ secrets.GITHUB_TOKEN }}
argvs: "--disable-dependabot --disable-secret-scanning --disable-code-scanning --display"

build-and-push-image:
needs: compliance
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
maintainer=it@m, Landeshauptstadt Muenchen (LHM)
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: 21
distribution: "temurin"
cache: "maven"

- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: 16

- name: Build with Maven
run: mvn -B verify "-Dspring-boot.run.jvmArguments=-Dfile.encoding=UTF-8" -DskipTests=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install Java and Maven
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 21
distribution: "temurin"
cache: "maven"
- name: Set up Node 16
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snapshot_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ jobs:
fi
echo "::set-output name=new_version::$new_version"
- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "11"
java-version: "21"
distribution: "temurin"
cache: "maven"

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ $(pwd)
# helps local on dev computer to manage different java-versions (see more: https://www.jenv.be/)
.java-version

# do not check in application profile yml
apigateway/**/application-*.yml
# do not check in local application profile yml
apigateway/**/application-local.yml
apigateway/**/application-unittest.yml
95 changes: 43 additions & 52 deletions apigateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<spring.boot.version>2.7.8</spring.boot.version>
<spring.cloud.version>2021.0.5</spring.cloud.version>
<logstash.encoder.version>7.0.1</logstash.encoder.version>
<apache.commons.lang.version>3.12.0</apache.commons.lang.version>
<spring.boot.version>3.3.3</spring.boot.version>
<spring.cloud.version>2023.0.3</spring.cloud.version>
<!-- Version muss mit der in den spring-boot-dependencies bereitgestellten Lombok-Version übereinstimmen -->
<org.projectlombok.lombok.version>1.18.34</org.projectlombok.lombok.version>
<logstash.encoder.version>7.4</logstash.encoder.version>
<apache.commons.lang.version>3.14.0</apache.commons.lang.version>
<jvm.options>-Dorg.conscrypt.native.workdir=$(pwd)</jvm.options>
<itm-codeformat.version>1.0.3</itm-codeformat.version>
</properties>


Expand Down Expand Up @@ -59,19 +60,6 @@
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>

<!-- hateoas -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
<exclusions>
<!-- Remove dependency due to usage of spring webflux -->
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -83,14 +71,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-oauth2-client</artifactId>
</dependency>

<!-- hazelcast -->
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-hazelcast</artifactId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
</dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-spring</artifactId>
Expand Down Expand Up @@ -129,18 +119,22 @@

<!-- Logging -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash.encoder.version}</version>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-brave</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash.encoder.version}</version>
</dependency>

<!-- Frontend Lib -->
<dependency>
Expand All @@ -164,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.2.2</version>
<configuration>
<argLine>${jvm.options}</argLine>
</configuration>
Expand All @@ -181,15 +175,34 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<!--
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#parameter-name-discovery -->
<parameters>true</parameters>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.28.0</version>
<dependencies>
<dependency>
<groupId>de.muenchen.itm</groupId>
<groupId>de.muenchen.oss</groupId>
<artifactId>itm-java-codeformat</artifactId>
<version>${itm-codeformat.version}</version>
<version>1.0.7</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -213,28 +226,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>9.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import reactor.core.publisher.Hooks;

/**
* To do some base configuration for the non blocking client-server framework
Expand All @@ -31,6 +32,7 @@
public class ApiGatewayApplication {

public static void main(String[] args) {
Hooks.enableAutomaticContextPropagation();
SpringApplication.run(ApiGatewayApplication.class, args);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package de.muenchen.dave.configuration;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.WebProperties;
import org.springframework.boot.autoconfigure.web.reactive.error.DefaultErrorWebExceptionHandler;
import org.springframework.boot.autoconfigure.web.reactive.error.ErrorWebFluxAutoConfiguration;
import org.springframework.boot.web.reactive.error.ErrorAttributes;
import org.springframework.context.ApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.http.codec.ServerCodecConfigurer;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.reactive.result.view.ViewResolver;
import org.springframework.web.server.WebSession;
import reactor.core.publisher.Mono;

import java.util.stream.Collectors;

/**
* Verwenden der {@link Order} entsprechend der Definition
* in {@link ErrorWebFluxAutoConfiguration#errorWebExceptionHandler}.
*/
@Component
@Order(-1)
@Slf4j
public class CustomErrorWebExceptionHandler extends DefaultErrorWebExceptionHandler {

private static final String INVALID_GRANT = "[invalid_grant]";

public CustomErrorWebExceptionHandler(
final ErrorAttributes errorAttributes,
final WebProperties webProperties,
final ServerProperties serverProperties,
final ApplicationContext applicationContext,
final ObjectProvider<ViewResolver> viewResolvers,
final ServerCodecConfigurer serverCodecConfigurer) {
super(errorAttributes, webProperties.getResources(), serverProperties.getError(), applicationContext);
this.setViewResolvers(viewResolvers.orderedStream().collect(Collectors.toList()));
this.setMessageWriters(serverCodecConfigurer.getWriters());
this.setMessageReaders(serverCodecConfigurer.getReaders());
}

@Override
protected Mono<ServerResponse> renderErrorResponse(final ServerRequest request) {
final Throwable error = this.getError(request);
if (!ObjectUtils.isEmpty(error) && StringUtils.startsWith(error.getMessage(), INVALID_GRANT)) {
log.info("Invalidieren der WebSession und Antwort mit 302 (FOUND).");
request.exchange().getSession().subscribe(WebSession::invalidate);
return ServerResponse.status(HttpStatus.FOUND).build();
}
return super.renderErrorResponse(request);
}
}
Loading

0 comments on commit 5a6d93f

Please sign in to comment.