From b1956189d89ac7e824c209039f3c82926294549e Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 30 Aug 2014 22:21:35 +0200 Subject: [PATCH] Umstellung auf Thymeleaf: Schritt 1 - Thymeleaf zum Laufen bekommen * Tiles (vorerst) rausgeschmissen * Thymeleaf so weit konfiguriert, dass eine View /index.html erreichbar ist --- pom.xml | 18 +++++----- src/main/resources/log4j.xml | 3 ++ src/main/resources/spring/mvc.xml | 36 +++++++++++-------- src/main/webapp/WEB-INF/web.xml | 6 ++-- src/main/webapp/thymeleaf/404.html | 14 ++++++++ src/main/webapp/thymeleaf/error.html | 14 ++++++++ src/main/webapp/thymeleaf/index.html | 14 ++++++++ .../webapp/thymeleaf/templates/footer.html | 12 +++++++ .../webapp/thymeleaf/templates/header.html | 12 +++++++ src/main/webapp/thymeleaf/views/404.html | 14 ++++++++ src/main/webapp/thymeleaf/views/error.html | 13 +++++++ src/main/webapp/thymeleaf/views/index.html | 11 ++++++ 12 files changed, 141 insertions(+), 26 deletions(-) create mode 100644 src/main/webapp/thymeleaf/404.html create mode 100644 src/main/webapp/thymeleaf/error.html create mode 100644 src/main/webapp/thymeleaf/index.html create mode 100644 src/main/webapp/thymeleaf/templates/footer.html create mode 100644 src/main/webapp/thymeleaf/templates/header.html create mode 100644 src/main/webapp/thymeleaf/views/404.html create mode 100644 src/main/webapp/thymeleaf/views/error.html create mode 100644 src/main/webapp/thymeleaf/views/index.html diff --git a/pom.xml b/pom.xml index af8665d1..fd91c8d9 100644 --- a/pom.xml +++ b/pom.xml @@ -42,9 +42,9 @@ 2.2.1 1.2 3.0.1 - 1.5.8 + 1.6.1 4.0.6.RELEASE - 3.0.1 + 2.1.3.RELEASE 1.7.3-SNAPSHOT @@ -65,17 +65,17 @@ - + - org.apache.tiles - tiles-core - ${tiles.version} + org.thymeleaf + thymeleaf + ${thymeleaf.version} runtime - org.apache.tiles - tiles-jsp - ${tiles.version} + org.thymeleaf + thymeleaf-spring4 + ${thymeleaf.version} runtime diff --git a/src/main/resources/log4j.xml b/src/main/resources/log4j.xml index b6030f96..a3d7d445 100644 --- a/src/main/resources/log4j.xml +++ b/src/main/resources/log4j.xml @@ -16,6 +16,9 @@ + + + diff --git a/src/main/resources/spring/mvc.xml b/src/main/resources/spring/mvc.xml index a18d7398..e2cdc384 100644 --- a/src/main/resources/spring/mvc.xml +++ b/src/main/resources/spring/mvc.xml @@ -22,6 +22,7 @@ + /thymeleaf/**=staticResources /*.html=urlFilenameViewController /**/*.html=urlFilenameViewController @@ -29,24 +30,31 @@ + + + + /thymeleaf/ + + + - - + + + + - - - - - + + + + + + + - - - - classpath:/spring/tiles.xml - - - + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index b3fcbbfa..89be3285 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -55,15 +55,15 @@ Dispatcher Servlet - Branding - *.html + / 404 - /WEB-INF/404.jsp + /404.html - /WEB-INF/error.jsp + /error.html diff --git a/src/main/webapp/thymeleaf/404.html b/src/main/webapp/thymeleaf/404.html new file mode 100644 index 00000000..ab9c2948 --- /dev/null +++ b/src/main/webapp/thymeleaf/404.html @@ -0,0 +1,14 @@ + + + + TITLE + + + + +
HEADER
+

TITLE

+
CONTENT
+
FOOTER
+ + diff --git a/src/main/webapp/thymeleaf/error.html b/src/main/webapp/thymeleaf/error.html new file mode 100644 index 00000000..9084f7f0 --- /dev/null +++ b/src/main/webapp/thymeleaf/error.html @@ -0,0 +1,14 @@ + + + + TITLE + + + + +
HEADER
+

TITLE

+
CONTENT
+
FOOTER
+ + diff --git a/src/main/webapp/thymeleaf/index.html b/src/main/webapp/thymeleaf/index.html new file mode 100644 index 00000000..7f29820f --- /dev/null +++ b/src/main/webapp/thymeleaf/index.html @@ -0,0 +1,14 @@ + + + + TITLE + + + + +
HEADER
+

TITLE

+
CONTENT
+
FOOTER
+ + diff --git a/src/main/webapp/thymeleaf/templates/footer.html b/src/main/webapp/thymeleaf/templates/footer.html new file mode 100644 index 00000000..32d3ffc9 --- /dev/null +++ b/src/main/webapp/thymeleaf/templates/footer.html @@ -0,0 +1,12 @@ + + + + Footer-Template + + +
+
+ © 2014 juplo NG +
+ + \ No newline at end of file diff --git a/src/main/webapp/thymeleaf/templates/header.html b/src/main/webapp/thymeleaf/templates/header.html new file mode 100644 index 00000000..a2370235 --- /dev/null +++ b/src/main/webapp/thymeleaf/templates/header.html @@ -0,0 +1,12 @@ + + + + Header-Template + + +
+ juplo proudly presemts: +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/thymeleaf/views/404.html b/src/main/webapp/thymeleaf/views/404.html new file mode 100644 index 00000000..18483826 --- /dev/null +++ b/src/main/webapp/thymeleaf/views/404.html @@ -0,0 +1,14 @@ + + + + 404: Page not found + + +
+

We do not know, where you are.

+

And we do not know, why you are here.

+

But we can tell you: WE ARE SORRY!

+

Really.

+
+ + diff --git a/src/main/webapp/thymeleaf/views/error.html b/src/main/webapp/thymeleaf/views/error.html new file mode 100644 index 00000000..ad0457a4 --- /dev/null +++ b/src/main/webapp/thymeleaf/views/error.html @@ -0,0 +1,13 @@ + + + + An unexpected Error occured! + + +
+

We do not know, what happend.

+

But we can tell you: WE ARE SORRY!

+

Really.

+
+ + diff --git a/src/main/webapp/thymeleaf/views/index.html b/src/main/webapp/thymeleaf/views/index.html new file mode 100644 index 00000000..b44963cd --- /dev/null +++ b/src/main/webapp/thymeleaf/views/index.html @@ -0,0 +1,11 @@ + + + + Index + + +
+

Inhalt der Index-Seite...

+
+ + -- 2.20.1