Moved the embedded default-templates into the classpath
authorKai Moritz <kai@juplo.de>
Tue, 3 Jul 2018 08:12:53 +0000 (10:12 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 3 Jul 2018 14:51:02 +0000 (16:51 +0200)
Otherwise, if the app is packaged, the templates will not be included,
because the webapp-directory is ignored for builds of type "jar".

src/main/resources/application.properties
src/main/resources/thymeleaf/connect/facebookConnect.html [new file with mode: 0644]
src/main/resources/thymeleaf/connect/facebookConnected.html [new file with mode: 0644]
src/main/resources/thymeleaf/home.html [new file with mode: 0644]
src/main/resources/thymeleaf/profile.html [new file with mode: 0644]
src/main/resources/thymeleaf/signin.html [new file with mode: 0644]
src/main/webapp/thymeleaf/connect/facebookConnect.html [deleted file]
src/main/webapp/thymeleaf/connect/facebookConnected.html [deleted file]
src/main/webapp/thymeleaf/home.html [deleted file]
src/main/webapp/thymeleaf/profile.html [deleted file]
src/main/webapp/thymeleaf/signin.html [deleted file]

index 53179d2..ea935bb 100644 (file)
@@ -9,7 +9,7 @@ server.ssl.key-store-password=secret
 httpclient.timeout.connection=@yourshouter.facebook.app.httpclient.timeout.connection@
 httpclient.timeout.read=@yourshouter.facebook.app.httpclient.timeout.read@
 
-spring.thymeleaf.prefix=/thymeleaf/
+spring.thymeleaf.prefix=classpath:/thymeleaf/
 spring.thymeleaf.cache=false
 
 spring.datasource.url=@yourshouter.facebook.app.jdbc.url@
diff --git a/src/main/resources/thymeleaf/connect/facebookConnect.html b/src/main/resources/thymeleaf/connect/facebookConnect.html
new file mode 100644 (file)
index 0000000..5e275d8
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title>Connect to Facebook</title>
+  </head>
+  <body>
+    <h1>Connect to Facebook</h1>
+    <form action="#" th:action="@{/connect/facebook}" method="POST">
+      <div class="formInfo">
+        <p>
+          You aren't connected to Facebook yet.
+          Click the button to connect with your Facebook account.
+        </p>
+      </div>
+      <p><button type="submit">Connect to Facebook</button></p>
+    </form>
+  </body>
+</html>
diff --git a/src/main/resources/thymeleaf/connect/facebookConnected.html b/src/main/resources/thymeleaf/connect/facebookConnected.html
new file mode 100644 (file)
index 0000000..6c28e0d
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title>Connect to Facebook</title>
+  </head>
+  <body>
+    <p>Back <a href="home.html" th:href="@{/}">HOME</a></p>
+    <hr />
+    <h1>Connected to Facebook</h1>
+    <p>
+      You are now connected to your Facebook account.
+    </p>               
+  </body>
+</html>
diff --git a/src/main/resources/thymeleaf/home.html b/src/main/resources/thymeleaf/home.html
new file mode 100644 (file)
index 0000000..f7649e5
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title>Home</title>
+  </head>
+  <body>
+    <h1>Hello, <span th:text="${user.name}">Some User</span>!</h1>
+    <ul>
+      <li><a href="connect/facebookConnected.html" th:href="@{/connect/facebook.html}">Show connection-status</a></li>
+      <li><a href="profile.html" th:href="@{/profile.html}">Show public profile-data</a></li>
+      <li><a href="#" th:href="@{/h2-console}">Connect to the H2-console</a></li>
+    </ul>
+  </body>
+</html>
diff --git a/src/main/resources/thymeleaf/profile.html b/src/main/resources/thymeleaf/profile.html
new file mode 100644 (file)
index 0000000..c6f02e4
--- /dev/null
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title>Public Profile Data</title>
+  </head>
+  <body>
+    <p>Back <a href="home.html" th:href="@{/}">HOME</a></p>
+    <hr />
+    <h1>Public available profile-data</h1>
+    <ul>
+      <li><strong>ID:</strong> <em th:text="${profile.id}">123456789</em></li>
+      <li><strong>Name:</strong> <em th:text="${profile.name}">Kai Moritz</em></li>
+      <li><strong>First Name:</strong> <em th:text="${profile.firstName}">Kai</em></li>
+      <li><strong>Last Name:</strong> <em th:text="${profile.lastName}">Moritz</em></li>
+      <li><strong>Gender:</strong> <em th:text="${profile.gender}">male</em></li>
+      <li><strong>Verified:</strong> <em th:text="${profile.verified}">true</em></li>
+      <li th:if="${profile.cover}"><strong>Cover:</strong> <img src="" th:src="${profile.cover.source}" alt="1234567" th:alt="${profile.cover.id}" /></li>
+    </ul>
+  </body>
+</html>
diff --git a/src/main/resources/thymeleaf/signin.html b/src/main/resources/thymeleaf/signin.html
new file mode 100644 (file)
index 0000000..687d7f4
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
+  <head>
+    <title>Sign In</title>
+  </head>
+  <body>
+    <form action="#" th:action="@{/signin/facebook}" method="POST">
+      <input type="hidden" name="scope" value="public_profile,manage_pages" />
+      <button type="submit">Sign in with Facebook</button>
+    </form>
+  </body>
+</html>
diff --git a/src/main/webapp/thymeleaf/connect/facebookConnect.html b/src/main/webapp/thymeleaf/connect/facebookConnect.html
deleted file mode 100644 (file)
index 5e275d8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-  <head>
-    <title>Connect to Facebook</title>
-  </head>
-  <body>
-    <h1>Connect to Facebook</h1>
-    <form action="#" th:action="@{/connect/facebook}" method="POST">
-      <div class="formInfo">
-        <p>
-          You aren't connected to Facebook yet.
-          Click the button to connect with your Facebook account.
-        </p>
-      </div>
-      <p><button type="submit">Connect to Facebook</button></p>
-    </form>
-  </body>
-</html>
diff --git a/src/main/webapp/thymeleaf/connect/facebookConnected.html b/src/main/webapp/thymeleaf/connect/facebookConnected.html
deleted file mode 100644 (file)
index 6c28e0d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-  <head>
-    <title>Connect to Facebook</title>
-  </head>
-  <body>
-    <p>Back <a href="home.html" th:href="@{/}">HOME</a></p>
-    <hr />
-    <h1>Connected to Facebook</h1>
-    <p>
-      You are now connected to your Facebook account.
-    </p>               
-  </body>
-</html>
diff --git a/src/main/webapp/thymeleaf/home.html b/src/main/webapp/thymeleaf/home.html
deleted file mode 100644 (file)
index f7649e5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-  <head>
-    <title>Home</title>
-  </head>
-  <body>
-    <h1>Hello, <span th:text="${user.name}">Some User</span>!</h1>
-    <ul>
-      <li><a href="connect/facebookConnected.html" th:href="@{/connect/facebook.html}">Show connection-status</a></li>
-      <li><a href="profile.html" th:href="@{/profile.html}">Show public profile-data</a></li>
-      <li><a href="#" th:href="@{/h2-console}">Connect to the H2-console</a></li>
-    </ul>
-  </body>
-</html>
diff --git a/src/main/webapp/thymeleaf/profile.html b/src/main/webapp/thymeleaf/profile.html
deleted file mode 100644 (file)
index c6f02e4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-  <head>
-    <title>Public Profile Data</title>
-  </head>
-  <body>
-    <p>Back <a href="home.html" th:href="@{/}">HOME</a></p>
-    <hr />
-    <h1>Public available profile-data</h1>
-    <ul>
-      <li><strong>ID:</strong> <em th:text="${profile.id}">123456789</em></li>
-      <li><strong>Name:</strong> <em th:text="${profile.name}">Kai Moritz</em></li>
-      <li><strong>First Name:</strong> <em th:text="${profile.firstName}">Kai</em></li>
-      <li><strong>Last Name:</strong> <em th:text="${profile.lastName}">Moritz</em></li>
-      <li><strong>Gender:</strong> <em th:text="${profile.gender}">male</em></li>
-      <li><strong>Verified:</strong> <em th:text="${profile.verified}">true</em></li>
-      <li th:if="${profile.cover}"><strong>Cover:</strong> <img src="" th:src="${profile.cover.source}" alt="1234567" th:alt="${profile.cover.id}" /></li>
-    </ul>
-  </body>
-</html>
diff --git a/src/main/webapp/thymeleaf/signin.html b/src/main/webapp/thymeleaf/signin.html
deleted file mode 100644 (file)
index 687d7f4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
-  <head>
-    <title>Sign In</title>
-  </head>
-  <body>
-    <form action="#" th:action="@{/signin/facebook}" method="POST">
-      <input type="hidden" name="scope" value="public_profile,manage_pages" />
-      <button type="submit">Sign in with Facebook</button>
-    </form>
-  </body>
-</html>