diff --git a/spring-thymeleaf-2/README.md b/spring-thymeleaf-2/README.md
index e7f0c60add..9f727f30ca 100644
--- a/spring-thymeleaf-2/README.md
+++ b/spring-thymeleaf-2/README.md
@@ -1,6 +1,16 @@
+## Spring Thymeleaf
+
+This module contains articles about Spring with Thymeleaf
+
## Relevant Articles:
- [Working with Enums in Thymeleaf](https://www.baeldung.com/thymeleaf-enums)
- [Changing the Thymeleaf Template Directory in Spring Boot](https://www.baeldung.com/spring-thymeleaf-template-directory)
- [Spring Request Parameters with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-request-parameters)
- [Thymeleaf lists Utility Object](https://www.baeldung.com/thymeleaf-lists-utility)
+- [Working with Arrays in Thymeleaf](https://www.baeldung.com/thymeleaf-arrays)
+- [Spring Path Variables with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-path-variables)
+- [Working with Boolean in Thymeleaf](https://www.baeldung.com/thymeleaf-boolean)
+- [Working With Custom HTML Attributes in Thymeleaf](https://www.baeldung.com/thymeleaf-custom-html-attributes)
+- [How to Create an Executable JAR with Maven](https://www.baeldung.com/executable-jar-with-maven)
+- [[<-- prev]](/spring-thymeleaf)
\ No newline at end of file
diff --git a/spring-thymeleaf-2/pom.xml b/spring-thymeleaf-2/pom.xml
index d31e5fa7f6..d53bb8ab1a 100644
--- a/spring-thymeleaf-2/pom.xml
+++ b/spring-thymeleaf-2/pom.xml
@@ -35,6 +35,27 @@
org.apache.maven.plugins
maven-war-plugin
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+ ${tomcat7-maven-plugin.version}
+
+
+ tomcat-run
+
+ exec-war-only
+
+ package
+
+ /
+ false
+ webapp.jar
+ utf-8
+
+
+
+
spring-thymeleaf-2
@@ -42,5 +63,6 @@
1.8
1.8
+ 2.2
diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/arrays/ThymeleafArrayController.java
similarity index 92%
rename from spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java
rename to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/arrays/ThymeleafArrayController.java
index 8276cc4376..d137cbdf94 100644
--- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java
+++ b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/arrays/ThymeleafArrayController.java
@@ -1,4 +1,4 @@
-package com.baeldung.thymeleaf.controller;
+package com.baeldung.thymeleaf.arrays;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/BooleanExpressionsController.java b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/booleanexpressions/BooleanExpressionsController.java
similarity index 96%
rename from spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/BooleanExpressionsController.java
rename to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/booleanexpressions/BooleanExpressionsController.java
index 3a640e1499..e43e08334a 100644
--- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/BooleanExpressionsController.java
+++ b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/booleanexpressions/BooleanExpressionsController.java
@@ -1,4 +1,4 @@
-package com.baeldung.thymeleaf.controller;
+package com.baeldung.thymeleaf.booleanexpressions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/model/Course.java b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/Course.java
similarity index 95%
rename from spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/model/Course.java
rename to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/Course.java
index df2e9cd097..9bf8e5e52c 100644
--- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/model/Course.java
+++ b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/Course.java
@@ -1,4 +1,4 @@
-package com.baeldung.thymeleaf.model;
+package com.baeldung.thymeleaf.customhtml;
import java.util.Date;
diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/CourseRegistrationController.java b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/CourseRegistrationController.java
similarity index 83%
rename from spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/CourseRegistrationController.java
rename to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/CourseRegistrationController.java
index 2d2b5906e1..06e81ecba8 100644
--- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/CourseRegistrationController.java
+++ b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/CourseRegistrationController.java
@@ -1,4 +1,4 @@
-package com.baeldung.thymeleaf.controller;
+package com.baeldung.thymeleaf.customhtml;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
@@ -6,8 +6,6 @@ import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import com.baeldung.thymeleaf.model.Course;
-
/**
* Handles requests for the student model.
*
@@ -18,13 +16,13 @@ public class CourseRegistrationController {
@RequestMapping(value = "/registerCourse", method = RequestMethod.POST)
public String register(@ModelAttribute Course course, Model model) {
model.addAttribute("successMessage", "You have successfully registered for course: " + course.getName() + ".");
- return "courseRegistration.html";
+ return "templates/courseRegistration.html";
}
@RequestMapping(value = "/registerCourse", method = RequestMethod.GET)
public String register(Model model) {
model.addAttribute("course", new Course());
- return "courseRegistration.html";
+ return "templates/courseRegistration.html";
}
}
diff --git a/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/controller/ParticipantController.java b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/requestparameters/ParticipantController.java
similarity index 94%
rename from spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/controller/ParticipantController.java
rename to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/requestparameters/ParticipantController.java
index 9a354e709c..faa4ae0cf9 100644
--- a/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/controller/ParticipantController.java
+++ b/spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/requestparameters/ParticipantController.java
@@ -1,4 +1,4 @@
-package com.baeldung.thymeleaf.controller;
+package com.baeldung.thymeleaf.requestparameters;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
diff --git a/spring-thymeleaf/src/main/webapp/WEB-INF/views/booleans.html b/spring-thymeleaf-2/src/main/resources/templates/booleans.html
similarity index 100%
rename from spring-thymeleaf/src/main/webapp/WEB-INF/views/booleans.html
rename to spring-thymeleaf-2/src/main/resources/templates/booleans.html
diff --git a/spring-thymeleaf/src/main/resources/templates/continents.html b/spring-thymeleaf-2/src/main/resources/templates/continents.html
similarity index 100%
rename from spring-thymeleaf/src/main/resources/templates/continents.html
rename to spring-thymeleaf-2/src/main/resources/templates/continents.html
diff --git a/spring-thymeleaf/src/main/webapp/WEB-INF/views/courseRegistration.html b/spring-thymeleaf-2/src/main/resources/templates/courseRegistration.html
similarity index 100%
rename from spring-thymeleaf/src/main/webapp/WEB-INF/views/courseRegistration.html
rename to spring-thymeleaf-2/src/main/resources/templates/courseRegistration.html
diff --git a/spring-thymeleaf/.gitignore b/spring-thymeleaf/.gitignore
deleted file mode 100644
index b83d22266a..0000000000
--- a/spring-thymeleaf/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/target/
diff --git a/spring-thymeleaf/README.md b/spring-thymeleaf/README.md
index 329ef8580c..a5c6791609 100644
--- a/spring-thymeleaf/README.md
+++ b/spring-thymeleaf/README.md
@@ -9,16 +9,11 @@ This module contains articles about Spring with Thymeleaf
- [Spring and Thymeleaf 3: Expressions](https://www.baeldung.com/spring-thymeleaf-3-expressions)
- [Spring MVC + Thymeleaf 3.0: New Features](https://www.baeldung.com/spring-thymeleaf-3)
- [How to Work with Dates in Thymeleaf](https://www.baeldung.com/dates-in-thymeleaf)
-- [How to Create an Executable JAR with Maven](https://www.baeldung.com/executable-jar-with-maven)
-- [Working with Boolean in Thymeleaf](https://www.baeldung.com/thymeleaf-boolean)
- [Working with Fragments in Thymeleaf](https://www.baeldung.com/spring-thymeleaf-fragments)
- [Conditionals in Thymeleaf](https://www.baeldung.com/spring-thymeleaf-conditionals)
- [Iteration in Thymeleaf](https://www.baeldung.com/thymeleaf-iteration)
-- [Working With Arrays in Thymeleaf](https://www.baeldung.com/thymeleaf-arrays)
- [Spring with Thymeleaf Pagination for a List](https://www.baeldung.com/spring-thymeleaf-pagination)
- [Working with Select and Option in Thymeleaf](https://www.baeldung.com/thymeleaf-select-option)
-- [Working With Custom HTML Attributes in Thymeleaf](https://www.baeldung.com/thymeleaf-custom-html-attributes)
-- [Spring Request Parameters with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-request-parameters)
- [[next -->]](/spring-thymeleaf-2)
### Build the Project
@@ -35,7 +30,6 @@ Access the pages using the URLs:
- http://localhost:8082/spring-thymeleaf/
- http://localhost:8082/spring-thymeleaf/addStudent/
- http://localhost:8082/spring-thymeleaf/listStudents/
- - http://localhost:8082/spring-thymeleaf/booleans/
The first URL is the home page of the application. The home page has links to the second and third pages.
diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml
index cdc2ed25ae..d260a78d76 100644
--- a/spring-thymeleaf/pom.xml
+++ b/spring-thymeleaf/pom.xml
@@ -141,26 +141,6 @@
-
- org.apache.tomcat.maven
- tomcat7-maven-plugin
- ${tomcat7-maven-plugin.version}
-
-
- tomcat-run
-
- exec-war-only
-
- package
-
- /
- false
- webapp.jar
- utf-8
-
-
-
-
@@ -174,7 +154,6 @@
1.6.1
- 2.2
diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java
deleted file mode 100644
index bce0660fda..0000000000
--- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java
+++ /dev/null
@@ -1,12 +0,0 @@
-// package com.baeldung.thymeleaf;
-
-// import org.springframework.boot.SpringApplication;
-// import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-// @SpringBootApplication
-// public class WorkingWithArraysInThymeleafApplication {
-
-// public static void main(String[] args) {
-// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args);
-// }
-// }
diff --git a/spring-thymeleaf/src/main/webapp/WEB-INF/views/home.html b/spring-thymeleaf/src/main/webapp/WEB-INF/views/home.html
index 25ff6a19bb..b458f7270c 100644
--- a/spring-thymeleaf/src/main/webapp/WEB-INF/views/home.html
+++ b/spring-thymeleaf/src/main/webapp/WEB-INF/views/home.html
@@ -24,9 +24,6 @@
|
-
- |
-