Skip to content

Commit

Permalink
Vorbereitung Demo 18.09.24 (#71)
Browse files Browse the repository at this point in the history
* Messfaehigkeit ergaenzt (#60)

* Messfaehigkeit ergaenzt

* remove unused field

* remove MessstelleInfoDto

* fix reload

* change color

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

* DAVE-303 Refactor Hebung Frameworks Java (#65)

* hebung frameworks java

* enable tracingf

* hebung spring boot

* adaopt package lock json

* adaopt package lock json

* adaopt package lock json

* revert frontend files

* change github workflow

* Refactor/dave 314 pinia (#70)

* pkweinheit, snackbar und userStore umgestellt auf pinia

* stores auf pinia umgestellt

* fix test

* fix package-lock

* anmerkungen eingearbeitet

---------

Co-authored-by: Klaus Mueller <[email protected]>
Co-authored-by: boal <[email protected]>
  • Loading branch information
3 people authored Sep 17, 2024
1 parent a2c4e1f commit baf6f49
Show file tree
Hide file tree
Showing 92 changed files with 1,535 additions and 1,559 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ 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"

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

- name: Build with Maven
run: mvn -B verify "-Dspring-boot.run.jvmArguments=-Dfile.encoding=UTF-8" -DskipTests=true
10 changes: 5 additions & 5 deletions .github/workflows/build_feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ 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"

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

- name: Build with Maven
run: mvn -B verify "-Dspring-boot.run.jvmArguments=-Dfile.encoding=UTF-8" -DskipTests=true
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/build_push_ghcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: build image and push to ghcr.io

on:
push:
branches: [main-ls2]

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 }}
tags: |
type=raw,value=main-ls2
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
uses: actions/setup-node@v4
with:
node-version: 18

- 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 }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ 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
uses: actions/setup-node@v3
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Clean Maven Project Version
id: set-version
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/snapshot_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ 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"

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

- name: Build with Maven
run: mvn -B verify "-Dspring-boot.run.jvmArguments=-Dfile.encoding=UTF-8" -DskipTests=true
Expand Down
90 changes: 41 additions & 49 deletions apigateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,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 @@ -58,19 +59,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 @@ -82,6 +70,9 @@
<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>
Expand Down Expand Up @@ -129,18 +120,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 +159,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 +176,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 +227,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,17 +6,16 @@

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
* named Netty via properties use the properties listed in the link down below:
*
* @see <a href=
* "https://projectreactor.io/docs/netty/release/api/constant-values.html">https://projectreactor.io/docs/netty/release/api/constant-values.html</a>
* <p>
* As listed below, this above mentioned properties should be set before the application
* startup:
*
* <ul>
* <li>As command line argument: e.g. -Dreactor.netty.pool.maxConnections=1000.
* <li>As environmental property in Openshift: e.g. with key REACTOR_NETTY_POOL_MAXCONNECTIONS
Expand All @@ -25,7 +24,6 @@
* {@link ApiGatewayApplication#main}: e.g.
* <code>System.setProperty("reactor.netty.pool.maxConnections", "1000");</code>.
* </ul>
* <p>
* To get more information about Spring Cloud Gateway visit the following link:
* @see <a href=
* "https://cloud.spring.io/spring-cloud-gateway/reference/html/">https://cloud.spring.io/spring-cloud-gateway/reference/html/</a>
Expand All @@ -34,6 +32,7 @@
public class ApiGatewayApplication {

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

Expand Down
Loading

0 comments on commit baf6f49

Please sign in to comment.