From f6ef3fd62c3c88283414f140994cc7474e087a74 Mon Sep 17 00:00:00 2001 From: Pascal Myllek Date: Mon, 28 Apr 2025 19:24:26 +0200 Subject: [PATCH] Initial commit --- .DS_Store | Bin 0 -> 8196 bytes .classpath | 57 ++++ .idea/.gitignore | 8 + .idea/compiler.xml | 18 ++ .idea/encodings.xml | 6 + .idea/jarRepositories.xml | 20 ++ .idea/misc.xml | 13 + .project | 28 ++ .settings/org.eclipse.core.resources.prefs | 5 + .settings/org.eclipse.jdt.apt.core.prefs | 2 + .settings/org.eclipse.jdt.core.prefs | 10 + .../org.springframework.ide.eclipse.prefs | 2 + mvnw | 259 ++++++++++++++++++ mvnw.cmd | 149 ++++++++++ pom.xml | 63 +++++ src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/.DS_Store | Bin 0 -> 6148 bytes src/main/java/com/hmsa/.DS_Store | Bin 0 -> 6148 bytes .../com/hmsa/pr2tutorium/BlogController.java | 31 +++ .../com/hmsa/pr2tutorium/DBController.java | 29 ++ .../ExceptionHandlingController.java | 13 + src/main/java/com/hmsa/pr2tutorium/Post.java | 51 ++++ .../pr2tutorium/Pr2tutoriumApplication.java | 13 + src/main/resources/application.properties | 1 + src/main/resources/static/posts.db | Bin 0 -> 20480 bytes src/main/resources/templates/about.html | 167 +++++++++++ src/main/resources/templates/index.html | 198 +++++++++++++ src/main/resources/templates/post.html | 166 +++++++++++ .../Pr2tutoriumApplicationTests.java | 13 + target/.DS_Store | Bin 0 -> 6148 bytes target/classes/application.properties | 1 + .../com/hmsa/pr2tutorium/BlogController.class | Bin 0 -> 2547 bytes .../com/hmsa/pr2tutorium/DBController.class | Bin 0 -> 3283 bytes .../ExceptionHandlingController.class | Bin 0 -> 1140 bytes .../classes/com/hmsa/pr2tutorium/Post.class | Bin 0 -> 2883 bytes .../pr2tutorium/PostNotFoundException.class | Bin 0 -> 553 bytes .../pr2tutorium/Pr2tutoriumApplication.class | Bin 0 -> 762 bytes target/classes/static/posts.db | Bin 0 -> 20480 bytes target/classes/templates/about.html | 167 +++++++++++ target/classes/templates/index.html | 198 +++++++++++++ target/classes/templates/post.html | 166 +++++++++++ .../Pr2tutoriumApplicationTests.class | Bin 0 -> 560 bytes 44 files changed, 1854 insertions(+) create mode 100644 .DS_Store create mode 100644 .classpath create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/misc.xml create mode 100644 .project create mode 100644 .settings/org.eclipse.core.resources.prefs create mode 100644 .settings/org.eclipse.jdt.apt.core.prefs create mode 100644 .settings/org.eclipse.jdt.core.prefs create mode 100644 .settings/org.springframework.ide.eclipse.prefs create mode 100644 mvnw create mode 100644 mvnw.cmd create mode 100644 pom.xml create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/.DS_Store create mode 100644 src/main/java/com/.DS_Store create mode 100644 src/main/java/com/hmsa/.DS_Store create mode 100644 src/main/java/com/hmsa/pr2tutorium/BlogController.java create mode 100644 src/main/java/com/hmsa/pr2tutorium/DBController.java create mode 100644 src/main/java/com/hmsa/pr2tutorium/ExceptionHandlingController.java create mode 100644 src/main/java/com/hmsa/pr2tutorium/Post.java create mode 100644 src/main/java/com/hmsa/pr2tutorium/Pr2tutoriumApplication.java create mode 100644 src/main/resources/application.properties create mode 100644 src/main/resources/static/posts.db create mode 100644 src/main/resources/templates/about.html create mode 100644 src/main/resources/templates/index.html create mode 100644 src/main/resources/templates/post.html create mode 100644 src/test/java/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.java create mode 100644 target/.DS_Store create mode 100644 target/classes/application.properties create mode 100644 target/classes/com/hmsa/pr2tutorium/BlogController.class create mode 100644 target/classes/com/hmsa/pr2tutorium/DBController.class create mode 100644 target/classes/com/hmsa/pr2tutorium/ExceptionHandlingController.class create mode 100644 target/classes/com/hmsa/pr2tutorium/Post.class create mode 100644 target/classes/com/hmsa/pr2tutorium/PostNotFoundException.class create mode 100644 target/classes/com/hmsa/pr2tutorium/Pr2tutoriumApplication.class create mode 100644 target/classes/static/posts.db create mode 100644 target/classes/templates/about.html create mode 100644 target/classes/templates/index.html create mode 100644 target/classes/templates/post.html create mode 100644 target/test-classes/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.class diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..4b0f5049ea77835047604c237a5017514efd4467 GIT binary patch literal 8196 zcmeHM&ubGw6n@jB?S>-cpwNTDg4fcfsT4~=))*15M*M-6Hk%FU;$|mg(?%$TJ?q6k zz(2u*7r~=mJbLuv!IS<2dhnps@9m83PLlQ*1ZTp`H#_fpd2hd&?sPUpBx-xXD$ybl zIjD@~1vC>1+qsUF89j0lDBw>~XSLCi-QF0}4p;@O0#*U5fK|XM@UJLLb+qy z)jUsQs!+L;(1#D9BMW^(5m|J6znjrXcnWQ66|f47E5K*>A}v#gLK>Lo_pR4?TUXZW zek6U2IbUD>dinFqhwG+2IMd$S&Al5C6}ZwY;)WDZo0?|i3wSe;x8`G4uYJ7qL&eVd zcjZa+$qXYt?Qr}O;wOkcz$c^_8YE^Og|*47d_G`2_@?ri@O}Bb&SskVc_3q6y0nkH zhPNZx(%SRm?G|eFC@W0ElT-6>KP~iw5&ruT{ygu!C(5O$X5!Rc@ zEPt5vbf$0pUKA#SO68N7DHLbt=AC(G!P#o;%3)*B9PA~vX8#di-IX%(|Mr{yy|6vp zE}y?4<3Tfw+x^TT4BDVPz8}Vc9MNr(|XY_WZIixMtq( zc#;i!KKu2f&&hYSq(?X>_i!4=yc3s`_7ICPRmiu&*J=Z|`+p{fZL9)QSD>IGF7o;R z=IQVMr=FJ$Xce#uOiuw(tT*a4#8X@IcwpYDUDO>^F3d|6W-e&5-5i)5$AQN`7^3fj X%08aPR3S!C>^}mT47RZfOjUtDMPMgq literal 0 HcmV?d00001 diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..4e7f670 --- /dev/null +++ b/.classpath @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..fccb778 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..63e9001 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..52d3977 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/.project b/.project new file mode 100644 index 0000000..31a248c --- /dev/null +++ b/.project @@ -0,0 +1,28 @@ + + + Vorleistung2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + org.springframework.ide.eclipse.boot.validation.springbootbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..839d647 --- /dev/null +++ b/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..d4313d4 --- /dev/null +++ b/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..e60fa3f --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=21 +org.eclipse.jdt.core.compiler.compliance=21 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=21 diff --git a/.settings/org.springframework.ide.eclipse.prefs b/.settings/org.springframework.ide.eclipse.prefs new file mode 100644 index 0000000..a12794d --- /dev/null +++ b/.settings/org.springframework.ide.eclipse.prefs @@ -0,0 +1,2 @@ +boot.validation.initialized=true +eclipse.preferences.version=1 diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..19529dd --- /dev/null +++ b/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..b150b91 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..1a0c663 --- /dev/null +++ b/pom.xml @@ -0,0 +1,63 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.4.4 + + + com.hmsa + pr2tutorium + 0.0.1-SNAPSHOT + pr2tutorium + Demo project for Spring Boot + + + + + + + + + + + + + + + 21 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + + org.xerial + sqlite-jdbc + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000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YBRG|3$^ZZW literal 0 HcmV?d00001 diff --git a/src/main/java/.DS_Store b/src/main/java/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..40f9fee1b7b4bff8414eb1f88bce0362fbf2a081 GIT binary patch literal 6148 zcmeHKQA+|r5Z+bG6AA92z{i7Lg-k<|UJf&&*DmUz!aPsv=)4V2y9W{Ox&BbUq`y-$ zyK{k9ZxJLjF#GM!&g?ng%I=O3LUw1tz7Vz$!U9DsRG|4ra2|C<3S=n(N?bz?{Yd#R z!sS^00|U5sMKKggjL)K_{X2!3=7$!Y2zmKw@8WuaKw*eqLRt7_eP z4=VMhgXt{k4kp()x=j(LuA0R`qGLTX zVO6Y3->%K)%}%@Sv^s~2x-;)I8+GTP)m|(r*3RzU(Ru$d8prCz5HI0Bsbz~WhgaxO zHbF9seE4~ZHFaylMnlM1en^j$td^inefEoBb2Jn1vKoMQS z%%DCxpwT4&AU-3tKwm%p0Ua~|x`dfQuz*Mt3TQ$ll^Bw02Wi4#-X;Icpa~aJe;L-H zFH5RWB$Xc0(e6UJ2DxPhn1N*mie_lz{eSXv{l6Tww;YqM%=9@GAs5`YHxryozg}TEOmL2hb(V41xuO9|D>NZkT~TW#AK&=U03H literal 0 HcmV?d00001 diff --git a/src/main/java/com/.DS_Store b/src/main/java/com/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..d27f552c0a8681019da8633d218ccd26ba98adec GIT binary patch literal 6148 zcmeHKK}*9h6i&A4I)>1L!j1*61Lr2g;ic4xc(tMjmD#St6}v{(&K<^}XZ=I|6910A zmt=!Ey@@z^4_?0H<-Mf&Qj$Ez7;M`#@2-paWJp@!DZB+bgk`Ukz{_9^hYuv3j5%4a}_0_n7Cq`gsF`6 zREJqM%U!EFoi^I7n%!(4&T96w-Kf{>gJx?sE1NsJdq?Nphj^HXXGJ}S|5D19#yPw| zWwD+x?Zp9nA386LPu?hrMRE_e`5^OPLSldzAO_Z)0e!5Ql{H@neLgWj4E#I;cs|&m zh>pfwp*%XEkSPElJ|m?-T|WH*Z8QKn8gqqU0pThXP=#`xVsM=~a1{>yj`q(Ls&K~T z%rK6gnd=ON>%@cG(w%WfA(g}cF|f=)Q8g{R|4+Wp|CfWPMGO!F|B3-_bi9rWOVW4i y%Hr^@wL$MdQP3|}xCnuYyo$jWui`4G6tLS^0dzFx3c&(G4*^L76~w@=GVlTC^I6>h literal 0 HcmV?d00001 diff --git a/src/main/java/com/hmsa/.DS_Store b/src/main/java/com/hmsa/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..20df76f8e2ef3c5376b071307773db4bcde329a5 GIT binary patch literal 6148 zcmeHKO-sW-5S^{nrWBzEg&r5Y7OYi@#Y?Ca@oGd5Dz!01gK4%ji9M7;&iaS^CH@_q z+1-j#dzB(HF#Gmn-tOjY*be{@oh;Y`r~-h4PFN^o@{3VB`GOT}O%YM(J~Bu_!5Biw z7NWUg6&0YhtH21?tch#)ef@@Kk-GOI9;fKd4{exR%JL`4$gUsLHqsmPz_`~GD(nDnY!$0|ZJG)2cy{Bjxs~0_g z5ctn(+q5``SIjKYBuMTfA7@L{B_Yq=IF3~OfD!Wn<{dM#0;~Wlup$cB?a8UE$b5Jj ztN<&pIttMKAkhh3i@8C)bzq{O0El#r)P{MwED}drbS>rvu?0;SDx#qZ`@|52j`h;U zxfXMSh7Q6$K7<`v*cXb>qhtS4hl6kpa>@#@0zVa4GsP;M|0m1e|367wVg*=%f2DvZ zcD-%~Kgpi03m->ktwg^=C!@IB;1>lm`Y6U&I*M!P+OS?y2GO;c8^jtkz6fX;IAI0; GRDn+~5M?_6 literal 0 HcmV?d00001 diff --git a/src/main/java/com/hmsa/pr2tutorium/BlogController.java b/src/main/java/com/hmsa/pr2tutorium/BlogController.java new file mode 100644 index 0000000..44fdcb1 --- /dev/null +++ b/src/main/java/com/hmsa/pr2tutorium/BlogController.java @@ -0,0 +1,31 @@ +package com.hmsa.pr2tutorium; + +import java.util.ArrayList; +import java.util.HashMap; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +@Controller +public class BlogController { + + public BlogController() { + + } + + @GetMapping("/") + public String blogMap(Model model) { + + return "index"; + } + + @GetMapping("/posts/{id}") + public String blog(@PathVariable int id, Model model) { + + return "post"; + + } + +} diff --git a/src/main/java/com/hmsa/pr2tutorium/DBController.java b/src/main/java/com/hmsa/pr2tutorium/DBController.java new file mode 100644 index 0000000..2afb10a --- /dev/null +++ b/src/main/java/com/hmsa/pr2tutorium/DBController.java @@ -0,0 +1,29 @@ +package com.hmsa.pr2tutorium; + +import java.sql.*; +import java.util.ArrayList; +import java.util.HashMap; + +public class DBController { + private Connection connection; + private ArrayList posts; + private HashMap postsMap; + + + public DBController() { + String query = "SELECT * FROM blog_post"; + + + try { + Class.forName("org.sqlite.JDBC"); + connection = DriverManager.getConnection("jdbc:sqlite:src/main/resources/static/posts.db"); + } catch(Exception e) { + e.printStackTrace(); + } + + + } + + + +} \ No newline at end of file diff --git a/src/main/java/com/hmsa/pr2tutorium/ExceptionHandlingController.java b/src/main/java/com/hmsa/pr2tutorium/ExceptionHandlingController.java new file mode 100644 index 0000000..a2af990 --- /dev/null +++ b/src/main/java/com/hmsa/pr2tutorium/ExceptionHandlingController.java @@ -0,0 +1,13 @@ +package com.hmsa.pr2tutorium; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.servlet.ModelAndView; + +@ControllerAdvice +public class ExceptionHandlingController { + + +} diff --git a/src/main/java/com/hmsa/pr2tutorium/Post.java b/src/main/java/com/hmsa/pr2tutorium/Post.java new file mode 100644 index 0000000..4928fea --- /dev/null +++ b/src/main/java/com/hmsa/pr2tutorium/Post.java @@ -0,0 +1,51 @@ +package com.hmsa.pr2tutorium; + +public class Post { + private int id; + private String title; + private String body; + private String subtitle; + + + public Post() {} + + public Post(int id, String title, String body, String subtitle) { + this.setId(id); + this.setTitle(title); + this.setBody(body); + this.setSubtitle(subtitle); + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getSubtitle() { + return subtitle; + } + + public void setSubtitle(String subtitle) { + this.subtitle = subtitle; + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + +} diff --git a/src/main/java/com/hmsa/pr2tutorium/Pr2tutoriumApplication.java b/src/main/java/com/hmsa/pr2tutorium/Pr2tutoriumApplication.java new file mode 100644 index 0000000..0113d6e --- /dev/null +++ b/src/main/java/com/hmsa/pr2tutorium/Pr2tutoriumApplication.java @@ -0,0 +1,13 @@ +package com.hmsa.pr2tutorium; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Pr2tutoriumApplication { + + public static void main(String[] args) { + SpringApplication.run(Pr2tutoriumApplication.class, args); + } + +} diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..9661abd --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.application.name=pr2tutorium \ No newline at end of file diff --git a/src/main/resources/static/posts.db b/src/main/resources/static/posts.db new file mode 100644 index 0000000000000000000000000000000000000000..3c62c21effd16cb1b63bb43fb9875bce2074c6fb GIT binary patch literal 20480 zcmeHPTW=f36{ap}YNak4^ubNhKohyPtXkrd6lLocrj$&}vMJftCAJe3i{b8&JLcZB z7fJM+lOhP(m$ZEff)?;|enTHqAWi!N+P>taKcPT?Jhb1LB`G?NS}IL|z+NGaW@dNK z%zWoEXJ*dP_U)RC1Z#MK!y`7E`9WrADD!j1GMUUA{ym3(-JjDajCL#dJ=9k|t~i&; z-MN1H`~S`ipZ+v+`qS)3*^iEUHEmB3ND)X8ND)X8ND)X8ND)X8ND)X8_~sDEel|RE zW_*0;?Kt9fThwi@srz0S^$NqQTh+==mF-kkYE{;2W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>e+J6980JtLn literal 0 HcmV?d00001 diff --git a/src/main/resources/templates/about.html b/src/main/resources/templates/about.html new file mode 100644 index 0000000..5e6a072 --- /dev/null +++ b/src/main/resources/templates/about.html @@ -0,0 +1,167 @@ + + + + + + + About Me + + + + + + + +
+
+

About Me

+ This is me. +
+ + +
+
+
+ Name: + Name +
+
+ Alter: + Alter +
+
+ Semester: + Semester +
+
+ Studiengang: + Studiengang +
+
+
+
+ + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000..339b5bc --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,198 @@ + + + + + + + PR2 Blog + + + + + + + +
+
+
+

PR2 Blog

+ A Blog for PR2 Prüfungsvorleistung +
+
+

Ein Fehler ist aufgetreten

+
+
+ + +
+
+ +

>

+
+

+

+ Posted by + on +

+
+
+
+ + + + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/src/main/resources/templates/post.html b/src/main/resources/templates/post.html new file mode 100644 index 0000000..19ecc56 --- /dev/null +++ b/src/main/resources/templates/post.html @@ -0,0 +1,166 @@ + + + + + + + + + + +
+ +
+ Zurück +

My Blog

+
+ + +
+
+
+ +

Post Title

+
+
+

Post Subtitle

+
Post Content
+
+
+
+
+ + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/src/test/java/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.java b/src/test/java/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.java new file mode 100644 index 0000000..b96f641 --- /dev/null +++ b/src/test/java/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.java @@ -0,0 +1,13 @@ +package com.hmsa.pr2tutorium; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class Pr2tutoriumApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/target/.DS_Store b/target/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..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HEd0_H`h*+1pxur!?F>3eZo7(WB zpr%$FBiX~d1$f>-7bp%4Vs47^HI-oR^iEUCCEwSf4rC{;X=s7nw0I-TK8=F9%C?l_ zWliC;ZAWM8D#(_vXRl^OwxJ%eStxIAViffh6donfFx{dlaC)Z*j`zfGDLZZpaRXVA zHTM7K0zdaRhMr-Z#VzU8T@{|L_D?02Mo<=PNF^6~^7jy*XCNJ);pt`0`1s%kt&G1m|Bd}r z;WwmS@ER90Z_WRK>0#W@9Q%bE!+lPtU}2h%<&mz_Y<#filrFG>n{;mBAa0?|bUx#G z6FOe`oGTTsj0hS6tNg~fxyJAILx>RT9DRX1%-m%56Wu5HpEH@wyuj?*xxaDfHBLU5 zd4@hv zaclT~=7X)_N10L&)Kvp2E^7?xEaj174f2FjV4B4)sOi}CHYmGSiGA7rnoNAtb^mR* a7Di#;asE9&qDGCMgu_{iqsMUJ;pqRN7>sWK literal 0 HcmV?d00001 diff --git a/target/classes/com/hmsa/pr2tutorium/DBController.class b/target/classes/com/hmsa/pr2tutorium/DBController.class new file mode 100644 index 0000000000000000000000000000000000000000..b912a58c868046773c7e4d5b042bda88bef31d84 GIT binary patch literal 3283 zcmcIm+jA4w9sZ7xyh2`LENl~n#4&fvH&H@v7KMOq5~s2a$Tfi`AuDN-7gk!ayK+q0 zQc9c9OD^QnTYAmaxipz}S`12Nnmpy9o#{;9^3>@=o-)%vzz-??&T3_^iAiTVlb1c0 z{awEE{VwPH^*`_Z1;9SM8$$@I6ogeo&?K<-q&B0aOs!l@P2^7Mc~_umw^26SJp!w` zlT%Sd1=eRrG9yEiT|Hd~4o{4A)V4Xng z(x3Y@XL?Ml#1OAL>rk;CHwr{OEBr%n0YkocI*OYFS}eOb;G8xMS0A{aAY!-~wY zX+}9^>yA~m^SYCAT+KD|DG%>JAs53IY*nyL#ddTHba)`Bof@`{8QmV!%34v!d3{7udr34cW74Cd7kvV;e87ay_%-4R1{wkOPCGK2*DKOz4E@-l;wv(R zS}LT#&AM9t)TFKD^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Z4MT`z1ggAVd2)-5fd@o$1CmurFivZQ89GG4UsKuY4&0U8t1mgYj(8c?t;Mv^m= z%f3Y)q8IH<vr{x=swbr67I9TkR5Kc8ag$E?MhYY6ImK*FgDz%iw`;q+hFhYHACOV33L0+v ziYgru#gc|kMUk|8Hc@@1;f}8|d?!YDJ6~w{5_c8G>&CIUVK*v<_rmgyICDLt;kgPw z<%;LI{yWXw`K{^YhF#@N4wkHjxz(&6n9i8kwx%{QqRO$ zQ8@XZ-P&W`KQ);<)g8kz>ZWHpWK0|e`OCB~@`m}=PTJ92WFQ7;ahg@kTfRw-1~bWE z=BVuG-*_+&@|Amgc98oDnX=t1E+nB2Fj zt13U~r>aa&lTqf9gCZsML2&Sq?(%IL26&H+Mzv&SKIx ze94mcC3}G{S>C>6<@=J2gK`+mG$i?4;ah=HQ6}_1pnmhs?(r!<0~fH$rxqAs4fpvb zi@)NbviMKRG-X~E>k}=c^n42!^jj?q>)ChQ&j-h)Z9u)`#|rSLeCX(7yXH!c1#qy5ECIYNW$- z+h;09GA)Lg)+3qtuP2IWG0e0{rbj)Pq%u29QhN$dBAJ%MOiv=2`2Q@5X*tZaMW*c@ zOwu*j(Ls+jzx~;cgzcffy-UMQ|&VELy3FE@Dy8= VY3}?j$2MN@EyLM&_yIp6`wwXq>{I{% literal 0 HcmV?d00001 diff --git a/target/classes/com/hmsa/pr2tutorium/PostNotFoundException.class b/target/classes/com/hmsa/pr2tutorium/PostNotFoundException.class new file mode 100644 index 0000000000000000000000000000000000000000..d7abf56e591c929da5bd63657a4e12a34c2b7641 GIT binary patch literal 553 zcma)(%Sr<=6o&uQ-W=<#UKXy#U0cNg!Ie@FwII|YR=Q6+r)_j5kxWK?EmwjIAHata zPpY7x3lliWN&bB2=j84EzH(aB1#pMYp9?quyrHvWt2!giLP?(R7z)$Bf4|SXo2#P(#o|3HX7Y;UEf)yCx^{J z1%W_oWYTDwW-_|7`!09JsyvOnfu3<4!!>^Z=Nip{K=H)HB(U67ntFLUBzrA~37^!v zW+an=w94mShebD4nZR!M|Ah|O`k1B(S^|QliLw>lsB^V zr~f@q!Zzl)g?;`a1HJ%CDDzz6U5y{G49i&I)g$-| pXNWehUR!SM{6Uy!Mld66eyY9*tj8+qOj_f&CBccuu5&D4;{z-4eQ*E( literal 0 HcmV?d00001 diff --git a/target/classes/com/hmsa/pr2tutorium/Pr2tutoriumApplication.class b/target/classes/com/hmsa/pr2tutorium/Pr2tutoriumApplication.class new file mode 100644 index 0000000000000000000000000000000000000000..7bc5dac68510388a1def1978667a623df4fe9ecd GIT binary patch literal 762 zcmb7CO;6iE5Ph2u96~5*D6|xM=q&`nN*sC#LV`#=xh-m{^w87VEY5d)r=_z}NeykG8KPmh9BPt^JRkq4c&5&SjrYSkpxe z`bs5*6;UcHEy(S|V}{nmTuO$GP-*$O$RcUK`CNuUXkwAhgjL>tcDCGH^#9bH}jrwa`vw za;9?SIndg;az6xfT1#EI6hX@+4omLj^NP-CTNMt+c#nXN$UhA*e?}xX$l|0K>GtRk z*zYpjC+WkWl9wcV{}M33CRwX^g)IW{#UDyApfdMtaKcPT?Jhb1LB`G?NS}IL|z+NGaW@dNK z%zWoEXJ*dP_U)RC1Z#MK!y`7E`9WrADD!j1GMUUA{ym3(-JjDajCL#dJ=9k|t~i&; z-MN1H`~S`ipZ+v+`qS)3*^iEUHEmB3ND)X8ND)X8ND)X8ND)X8ND)X8_~sDEel|RE zW_*0;?Kt9fThwi@srz0S^$NqQTh+==mF-kkYE{;2W*4N%);D*mYt=2bd2@$t?$&D4 zERvBe*z1+8)oYb4cA+?zpXz&Ra%{7Xdsz3(HruJ*1*sl69!HiJ9Q%oMntB}A$373^ zIt}QppNu_EbNuD=PwyO$$Mx3M`bK5z9=lP!M@*ZVX1kl~w|A@Tf@0RxRQ9vXpUx~T z4ZZcUf+yUwu^SGf*p!|g3CGv}Tl45+;&IHk7seP%#AO<#L`I0yR8un1t@LDoo^+Vs zeb!}mx87l{P%<+%Re0e$XR6~v8R?qhFd2sq3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RL$?8<%SBg$L%^)x5^*`e+!CoXq~LHdQx zcNEk=Jo;$(dw(B&l-~Y7f%((lF!s0f{vSaB1Kzpxf*8{K|Njy00ekoV-v1*+X*u&= zi6T@c|A5<$$0AhJl}uqlo#NA#OfOUdHwL{>i8MGR4Nm#8SfsB(IB_2_pv_2wQ;veb z(%_V5AUNgdTAZ9-<#?)~uQUwg=zh9CGLjH_TEajS@4p3M9GT2JXDI?;^2rE*#B)gQ z|H*Sm@Bh>Le-#P*jNSjMm>Ams4~?0bG4s?Xr+)VIZ+FufrU;}6qzI%4qzI%4oDhNG z(zib{`Zt-$!uxx#JZ!E#c31MHA=2G5!wtm!wpsFi-`OFzLkf>YvI?@L5a-%vE!R6h z&c;zj|{P4Ax)VPX6xZ6I@9~n1A9B_iJVdI}nIw<_rk|5rXRnJ-Ay%Ot{(Bk%AZd$U8#7 zG^#AAszeR?t67Nf#!+Bl;nISNq(&kNg@2zQPb%ORcl1?@`^b-(D6gqH>(oz_v2xwB zTz%CR2#TI4Q-vj!6A{@FLD1IMDCdJa6J=Fpo$84QRgrz6ubVc;LPbW!6A?&8avh?C zoSS4Es*(^v=E|Ua+>l7R6SjT}0q{V$Q$?N$szfZu=$xuaY({bx@&J%=h3IpH+apav z{cSXrEi<56Z?{BbSb8EY6Xj4fKrker8o>ova8{A_j|5*In=M(ZPK>lXsO2F&$*aVCFxrclxgMZI)MFU{)bit~k1sW4Y66z22u=ZXuI aJ#+^dk;vshS_BQ(B>^YASpy>e+J6980JtLn literal 0 HcmV?d00001 diff --git a/target/classes/templates/about.html b/target/classes/templates/about.html new file mode 100644 index 0000000..5e6a072 --- /dev/null +++ b/target/classes/templates/about.html @@ -0,0 +1,167 @@ + + + + + + + About Me + + + + + + + +
+
+

About Me

+ This is me. +
+ + +
+
+
+ Name: + Name +
+
+ Alter: + Alter +
+
+ Semester: + Semester +
+
+ Studiengang: + Studiengang +
+
+
+
+ + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/target/classes/templates/index.html b/target/classes/templates/index.html new file mode 100644 index 0000000..339b5bc --- /dev/null +++ b/target/classes/templates/index.html @@ -0,0 +1,198 @@ + + + + + + + PR2 Blog + + + + + + + +
+
+
+

PR2 Blog

+ A Blog for PR2 Prüfungsvorleistung +
+
+

Ein Fehler ist aufgetreten

+
+
+ + +
+
+ +

>

+
+

+

+ Posted by + on +

+
+
+
+ + + + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/target/classes/templates/post.html b/target/classes/templates/post.html new file mode 100644 index 0000000..19ecc56 --- /dev/null +++ b/target/classes/templates/post.html @@ -0,0 +1,166 @@ + + + + + + + + + + +
+ +
+ Zurück +

My Blog

+
+ + +
+
+
+ +

Post Title

+
+
+

Post Subtitle

+
Post Content
+
+
+
+
+ + +
+

Made with ♥️ in Mannheim.

+
+ + + diff --git a/target/test-classes/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.class b/target/test-classes/com/hmsa/pr2tutorium/Pr2tutoriumApplicationTests.class new file mode 100644 index 0000000000000000000000000000000000000000..a8116a1f55a938cb0bcef545dc4502881bcd80ac GIT binary patch literal 560 zcmb7ByH3L}6g^H$3vHpLuplvX$*VnSlz1NbP! zb*KO_ATjtpkI%h6etUm;1u(#79Rb5(Y*Ic;bHOv)cZD-n6)C^|jt5zms8~2<^ho9| zucOM)nTvbD6QQU4Dw@mKG1N|!R_>Icva>s8sGggNY@mXb7M4(BXopJ6%OZ`W9f>HB z4BgPgA{h&-e7-1F-Av^S{qVng9W%6Iqn&(op%D|}*t#jSQ>h%QT+x7m*2b0Zpx$<9 z?3B+7TA6I7oU~kIiu)%LQ)6ff8_Nsj_w4O@8g&D- hDe|Zec~7)Y$KPSUNt!=MNV$?Ez&b$#biZgefDaYeh?M{U literal 0 HcmV?d00001