Moved Thymeleaf-templates to src/main/webapp to enable hot reload part-00
authorKai Moritz <kai@juplo.de>
Mon, 25 Jan 2016 00:07:32 +0000 (01:07 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 30 Jan 2016 13:35:11 +0000 (14:35 +0100)
See http://juplo.de/fix-hot-reload-of-thymeleaf-templates-in-spring-bootrun/

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

index b5ee75e..80f6121 100644 (file)
@@ -1,5 +1,8 @@
 spring.social.facebook.appId=@facebook.app.id@
 spring.social.facebook.appSecret=@facebook.app.secret@
 
+spring.thymeleaf.prefix=/thymeleaf/
+spring.thymeleaf.cache=false
+
 logging.level.org.springframework.social=debug
 logging.level.de.juplo.yourshouter=info
diff --git a/src/main/resources/templates/connect/facebookConnect.html b/src/main/resources/templates/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/resources/templates/connect/facebookConnected.html b/src/main/resources/templates/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/resources/templates/home.html b/src/main/resources/templates/home.html
deleted file mode 100644 (file)
index b4d0074..0000000
+++ /dev/null
@@ -1,13 +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>
-    </ul>
-  </body>
-</html>
diff --git a/src/main/resources/templates/profile.html b/src/main/resources/templates/profile.html
deleted file mode 100644 (file)
index f0b3dab..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>Hello Facebook</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/connect/facebookConnect.html b/src/main/webapp/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/webapp/thymeleaf/connect/facebookConnected.html b/src/main/webapp/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/webapp/thymeleaf/home.html b/src/main/webapp/thymeleaf/home.html
new file mode 100644 (file)
index 0000000..b4d0074
--- /dev/null
@@ -0,0 +1,13 @@
+<!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>
+    </ul>
+  </body>
+</html>
diff --git a/src/main/webapp/thymeleaf/profile.html b/src/main/webapp/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>