diff --git a/ENSIM/Java/POO-Spring-TP5/.gitignore b/ENSIM/Java/POO-Spring-TP5/.gitignore new file mode 100644 index 0000000..82eca33 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/.gitignore @@ -0,0 +1,25 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/build/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.jar b/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..01e6799 Binary files /dev/null and b/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.jar differ diff --git a/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.properties b/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..7179346 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip diff --git a/ENSIM/Java/POO-Spring-TP5/mvnw b/ENSIM/Java/POO-Spring-TP5/mvnw new file mode 100644 index 0000000..5551fde --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/mvnw @@ -0,0 +1,286 @@ +#!/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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + 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" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/ENSIM/Java/POO-Spring-TP5/mvnw.cmd b/ENSIM/Java/POO-Spring-TP5/mvnw.cmd new file mode 100644 index 0000000..e5cfb0a --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/mvnw.cmd @@ -0,0 +1,161 @@ +@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 Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/ENSIM/Java/POO-Spring-TP5/pom.xml b/ENSIM/Java/POO-Spring-TP5/pom.xml new file mode 100644 index 0000000..4d37d34 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + fr.ensim.herbron + tp5 + 0.0.1-SNAPSHOT + jar + + tp5 + Demo project for Spring Boot + + + org.springframework.boot + spring-boot-starter-parent + 2.1.0.RELEASE + + + + + UTF-8 + UTF-8 + 1.8 + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-devtools + runtime + + + com.h2database + h2 + runtime + + + org.springframework.boot + spring-boot-starter-test + test + + + org.webjars.bower + materialize + 0.97.3 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/Tp5Application.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/Tp5Application.java new file mode 100644 index 0000000..00cdb9b --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/Tp5Application.java @@ -0,0 +1,12 @@ +package fr.ensim.herbron.tp5; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Tp5Application { + + public static void main(String[] args) { + SpringApplication.run(Tp5Application.class, args); + } +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/ArticleController.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/ArticleController.java new file mode 100644 index 0000000..4c02f52 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/ArticleController.java @@ -0,0 +1,22 @@ +package fr.ensim.herbron.tp5.controller; + +import fr.ensim.herbron.tp5.model.ArticleRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +@Controller +public class ArticleController { + + @Autowired + ArticleRepository articleRepository; + + @GetMapping("/article") + public String article(@RequestParam(name="artId")Long artId, Model model) + { + model.addAttribute("article", articleRepository.findById(artId).get()); + return "article"; + } +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/BlogController.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/BlogController.java new file mode 100644 index 0000000..871d9f6 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/BlogController.java @@ -0,0 +1,21 @@ +package fr.ensim.herbron.tp5.controller; + +import fr.ensim.herbron.tp5.model.ArticleRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class BlogController { + + @Autowired + ArticleRepository articleRepository; + + @GetMapping("/blog") + public String blog(Model model) + { + model.addAttribute("allArticles", articleRepository.findAll()); + return "blog"; + } +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/HelloWorldController.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/HelloWorldController.java new file mode 100644 index 0000000..62c4ba2 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/HelloWorldController.java @@ -0,0 +1,17 @@ +package fr.ensim.herbron.tp5.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +@Controller +public class HelloWorldController { + + @GetMapping("/greeting") + public String greeting(@RequestParam(name="nameGET",required=false , defaultValue="World")String nameGET, Model model) + { + model.addAttribute("nomTemplate", nameGET); + return "greeting"; + } +} \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SubmitController.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SubmitController.java new file mode 100644 index 0000000..5f7da4e --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SubmitController.java @@ -0,0 +1,36 @@ +package fr.ensim.herbron.tp5.controller; + +import fr.ensim.herbron.tp5.model.Article; +import fr.ensim.herbron.tp5.model.ArticleRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.Date; + +@Controller +public class SubmitController { + + @Autowired + ArticleRepository articleRepository; + + @GetMapping("/submit") + public String submitForm(Model model) { + model.addAttribute("submit", new Article()); + return "submit"; + } + + @PostMapping("/submit") + public String submit(@ModelAttribute Article article) + { + + article.setId(articleRepository.count() + 1); + article.setCreation(new Date()); + articleRepository.save(article); + return "success"; + } +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SuccessController.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SuccessController.java new file mode 100644 index 0000000..cfb4973 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/controller/SuccessController.java @@ -0,0 +1,16 @@ +package fr.ensim.herbron.tp5.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +@Controller +public class SuccessController { + + @GetMapping("/success") + public String success() + { + return "success"; + } +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/Article.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/Article.java new file mode 100644 index 0000000..6478e76 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/Article.java @@ -0,0 +1,73 @@ +package fr.ensim.herbron.tp5.model; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Lob; +import java.util.Date; + +@Entity +public class Article { + + @Id + private Long id; + private Date creation; + private String title; + + @Lob + private String content; + private String author; + + @Lob + private String src; + + public String getSrc() { + return src; + } + + public void setSrc(String src) { + this.src = src; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Date getCreation() { + return creation; + } + + public void setCreation(Date creation) { + this.creation = creation; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + +} \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/ArticleRepository.java b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/ArticleRepository.java new file mode 100644 index 0000000..2d970d2 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/java/fr/ensim/herbron/tp5/model/ArticleRepository.java @@ -0,0 +1,10 @@ +package fr.ensim.herbron.tp5.model; + +import org.springframework.data.repository.CrudRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface ArticleRepository extends CrudRepository
+{ + +} diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/application.properties b/ENSIM/Java/POO-Spring-TP5/src/main/resources/application.properties new file mode 100644 index 0000000..0fff7b5 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/application.properties @@ -0,0 +1,5 @@ +# Enabling H2 Console +spring.h2.console.enabled=true + +# Forcing UTF-8 encoding on the database +spring.datasource.sqlScriptEncoding=UTF-8 \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/css/custom.css b/ENSIM/Java/POO-Spring-TP5/src/main/resources/css/custom.css new file mode 100644 index 0000000..e8d2369 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/css/custom.css @@ -0,0 +1,3 @@ +nav { + background-color: #2C5364; +} \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/data.sql b/ENSIM/Java/POO-Spring-TP5/src/main/resources/data.sql new file mode 100644 index 0000000..689ce09 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/data.sql @@ -0,0 +1,8 @@ +INSERT INTO article (id ,creation ,title ,content, author, src) +VALUES(1, CURRENT_TIMESTAMP(), 'Premier article', 'C''est le premier contenu !', 'Thibault Smith', 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEBIVFRUWFRAVEA8QFRAPEA8QFRUWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGi0dHR0rLS0rLS0rLSstLS0tLS0tLS0rKy0tLSstLSstLS0tLS0tLS0tLS0tLS0tLSsrLS0tLf/AABEIAKgBKwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAAIDBQYBBwj/xABCEAACAgECAwUFBQUGBAcAAAABAgADE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3svWig8I+k3+l0iqOQnIpz/JbuHyKxFFFMllFFFAFFFFAFORRRpNM4YooA0yF1nYo4AzrIHWKKXCQusiZYopcJCyyJliijCJ1kLrFFAIHSQPXFFGELUyJqYooBE1MjaqKKBonpkD1xRRGgdRBrGE5FJphrLwIHdrAO+KKTTRJrAZMLhFFIN//2Q=='); + +INSERT INTO article (id ,creation ,title ,content, author, src) +VALUES(2, CURRENT_TIMESTAMP(), 'Second article', 'C''est un autre contenu !', 'Thibault Smith', 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEBIVFRUWFRAVEA8QFRAPEA8QFRUWFhUVFRUYHSggGBolHRUVITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGhAQGi0dHR0rLS0rLS0rLSstLS0tLS0tLS0rKy0tLSstLSstLS0tLS0tLS0tLS0tLS0tLSsrLS0tLf/AABEIAKgBKwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAAIDBQYBBwj/xABCEAACAgECAwUFBQUGBAcAAAABAgADEQQFEiExBkFRYXETIjKBkUJScqGxFBUzYsEHI1OCotEWQ7LwJGNzg5KT4f/EABgBAAMBAQAAAAAAAAAAAAAAAAABAgME/8QAIREBAQEBAAIDAQADAQAAAAAAAAERAhIhAzFRQRNCcSL/2gAMAwEAAhEDEQA/APb4oB++KP8AFX6icO96f/FX6iPxpbFhFKt+0GnH/MX6iRDtLp/vj6w8aNi5ilM/abTj7Y+sjbtTp/vCPxo2L2KUSdqtP3vHntTpf8T8jDxo2LqU/aXe10tRYkcR+Ef1jf8Aiaghih4ioyRgzyHtlvll9hLHl3L3ASer4tfj48qrN+3p7nLMxOSe+UdlkjuskLWZmHuuv1PRzPG02x7aazh4gvLxkSYA94GVIVtgkWQ/adE97hKx6t3CVVIDMFQEkkAT1nZNvTR0An4iOfjmVzxv2m9/ibQaGvR046uep85QbjrCxJJk247gXJJModRqI+uv5Ezn9K62A36icvtldfZI1eHXXk9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znkD8gZ6fV2GqH2RC6+y1S/ZEnxqteeaHcLR8KNNdtmk9uuWXBl/Xs1a/ZEMpoVeglSFrIarYrgfcblBD2bub4nM35aQ2NGNYX/hIfaJPrHDs5WOomq1BlddFgA6bSrX8Mc7g9RHsJCyxKSrcBOnVGCMJGWgBT6oyB9TB2aRO0WniZ75A9siYyJjFoPd5A5iYxhi0zWEjKyWcxJD1hbcRWbiBKVtZymQ7U7y9YyvjOm5GTd3a9T3yF7M9J5xs28XWkAKT5909H2HY7rAC/IeEJZmhdaRw6DPhM3uVQR/d7+s323bAFXBhh2Go8yo+ki9wYrux+u4k4T1HKamBaXb1T4RiGiY92W+lwooopBlGMI+cMZIWqBgdu2oeoEsI0xy0lb+7kHcJz9nUd0PcQexZUpBXgtghjrIHWXCA2LB3SHukhZJQAMkYUhjJImSAClZDYIWyyF1jCvuWB21y0sSC2VwCtauQtXLF65C1cRq965A9csWrkLVwPVY9chdJZvVIXok2GrGWRlZYtRIjTJMAUjTXDjVGmuIwXs4vZwspOcEQXWmYlefhKrdNv8AatwHviinV9snoHY3svWig8I+k3+l0iqOQnIpz/JbuHyKxFFFMllFFFAFFFFAFORRRpNM4YooA0yF1nYo4AzrIHWKKXCQusiZYopcJCyyJliijCJ1kLrFFAIHSQPXFFGELUyJqYooBE1MjaqKKBonpkD1xRRGgdRBrGE5FJphrLwIHdrAO+KKTTRJrAZMLhFFIN//2Q=='); + +INSERT INTO article (id , creation , title , content, author, src) +VALUES(3, CURRENT_TIMESTAMP(), 'Un rond-point triste de ne toujours pas avoir été bloqué par les Gilets-Jaunes', 'Saint-Germain-le-Fouilloux – Alors que le conflit des Gilets-Jaunes dure depuis maintenant plus de dix jours, le rond de Saint-Germain-le-Fouilloux, lui, n''a toujours pas été bloqué. une situation qui préoccupe l''intéressé qui ne comprend pas ce désamour. Reportage.', 'Le Gorafi', 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUSEBIVFRUWFRAVEA8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BaXb1T4RiGiY92W+lwooopBlGMI+cMZIWqBgdu2oeoEsI0xy0lb+7kHcJz9nUd0PcQexZUpBXgtghjrIHWXCA2LB3SHukhZJQAMkYUhjJImSAClZDYIWyyF1jCvuWB21y0sSC2VwCtauQtXLF65C1cRq965A9csWrkLVwPVY9chdJZvVIXok2GrGWRlZYtRIjTJMAUjTXDjVGmuIwXs4vZwspOcEQXWmYlefhKrdNv8AatwHviinV9snoHY3svWig8I+k3+l0iqOQnIpz/JbuHyKxFFFMllFFFAFFFFAFORRRpNM4YooA0yF1nYo4AzrIHWKKXCQusiZYopcJCyyJliijCJ1kLrFFAIHSQPXFFGELUyJqYooBE1MjaqKKBonpkD1xRRGgdRBrGE5FJphrLwIHdrAO+KKTTRJrAZMLhFFIN//2Q=='); \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/article.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/article.html new file mode 100644 index 0000000..7ae1fd2 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/article.html @@ -0,0 +1,29 @@ + + + + Article + + +
+ + +
+
+
+
+
+ + +
+
+

+

+
+

+

+
+
+
+
+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/blog.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/blog.html new file mode 100644 index 0000000..0eeb280 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/blog.html @@ -0,0 +1,17 @@ + + + + Blog + + +
+ + +
+

Les differents articles

+
+ +
+
+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/fragments/header.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/fragments/header.html new file mode 100644 index 0000000..4b703ed --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/fragments/header.html @@ -0,0 +1,26 @@ + + + +
+ + + + + + +
+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/greeting.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/greeting.html new file mode 100644 index 0000000..4502a54 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/greeting.html @@ -0,0 +1,11 @@ + + + + Blog + + + +

+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/submit.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/submit.html new file mode 100644 index 0000000..77fe72d --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/submit.html @@ -0,0 +1,28 @@ + + + + Article + + +

+ + +
+
+
+
+
+
+

Title:

+

Content:

+

Author:

+

Image:

+

+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/success.html b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/success.html new file mode 100644 index 0000000..4f98fd9 --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/main/resources/templates/success.html @@ -0,0 +1,25 @@ + + + + Article + + +
+ + +
+
+
+
+
+

Content published

+
+
+ Home +
+
+
+
+
+ + \ No newline at end of file diff --git a/ENSIM/Java/POO-Spring-TP5/src/test/java/fr/ensim/herbron/tp5/Tp5ApplicationTests.java b/ENSIM/Java/POO-Spring-TP5/src/test/java/fr/ensim/herbron/tp5/Tp5ApplicationTests.java new file mode 100644 index 0000000..679b9ad --- /dev/null +++ b/ENSIM/Java/POO-Spring-TP5/src/test/java/fr/ensim/herbron/tp5/Tp5ApplicationTests.java @@ -0,0 +1,16 @@ +package fr.ensim.herbron.tp5; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class Tp5ApplicationTests { + + @Test + public void contextLoads() { + } + +} diff --git a/ENSIM/Java/tp_poo_4a/.gitignore b/ENSIM/Java/tp_poo_4a/.gitignore deleted file mode 100644 index a1c2a23..0000000 --- a/ENSIM/Java/tp_poo_4a/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* diff --git a/ENSIM/Java/tp_poo_4a/.idea/.name b/ENSIM/Java/tp_poo_4a/.idea/.name deleted file mode 100644 index ba5e953..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -tp_poo_4a \ No newline at end of file diff --git a/ENSIM/Java/tp_poo_4a/.idea/compiler.xml b/ENSIM/Java/tp_poo_4a/.idea/compiler.xml deleted file mode 100644 index 30f10f4..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/compiler.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ENSIM/Java/tp_poo_4a/.idea/misc.xml b/ENSIM/Java/tp_poo_4a/.idea/misc.xml deleted file mode 100644 index 4b661a5..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/misc.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/ENSIM/Java/tp_poo_4a/.idea/uiDesigner.xml b/ENSIM/Java/tp_poo_4a/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ENSIM/Java/tp_poo_4a/.idea/vcs.xml b/ENSIM/Java/tp_poo_4a/.idea/vcs.xml deleted file mode 100644 index c2365ab..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ENSIM/Java/tp_poo_4a/.idea/workspace.xml b/ENSIM/Java/tp_poo_4a/.idea/workspace.xml deleted file mode 100644 index f0683b5..0000000 --- a/ENSIM/Java/tp_poo_4a/.idea/workspace.xml +++ /dev/null @@ -1,590 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -