Skip to content

Commit d719586

Browse files
authored
Merge pull request eugenp#8112 from catalin-burcea/BAEL-16666
[BAEL-16666] Split or move spring-thymeleaf module
2 parents 994651a + 2362615 commit d719586

File tree

18 files changed

+60
-76
lines changed

18 files changed

+60
-76
lines changed

spring-thymeleaf-2/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
## Spring Thymeleaf
2+
3+
This module contains articles about Spring with Thymeleaf
4+
15
## Relevant Articles:
26

37
- [Working with Enums in Thymeleaf](https://www.baeldung.com/thymeleaf-enums)
48
- [Changing the Thymeleaf Template Directory in Spring Boot](https://www.baeldung.com/spring-thymeleaf-template-directory)
59
- [Spring Request Parameters with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-request-parameters)
610
- [Thymeleaf lists Utility Object](https://www.baeldung.com/thymeleaf-lists-utility)
11+
- [Working with Arrays in Thymeleaf](https://www.baeldung.com/thymeleaf-arrays)
12+
- [Spring Path Variables with Thymeleaf](https://www.baeldung.com/spring-thymeleaf-path-variables)
13+
- [Working with Boolean in Thymeleaf](https://www.baeldung.com/thymeleaf-boolean)
14+
- [Working With Custom HTML Attributes in Thymeleaf](https://www.baeldung.com/thymeleaf-custom-html-attributes)
15+
- [How to Create an Executable JAR with Maven](https://www.baeldung.com/executable-jar-with-maven)
16+
- [[<-- prev]](/spring-thymeleaf)

spring-thymeleaf-2/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,34 @@
3535
<groupId>org.apache.maven.plugins</groupId>
3636
<artifactId>maven-war-plugin</artifactId>
3737
</plugin>
38+
39+
<plugin>
40+
<groupId>org.apache.tomcat.maven</groupId>
41+
<artifactId>tomcat7-maven-plugin</artifactId>
42+
<version>${tomcat7-maven-plugin.version}</version>
43+
<executions>
44+
<execution>
45+
<id>tomcat-run</id>
46+
<goals>
47+
<goal>exec-war-only</goal>
48+
</goals>
49+
<phase>package</phase>
50+
<configuration>
51+
<path>/</path>
52+
<enableNaming>false</enableNaming>
53+
<finalName>webapp.jar</finalName>
54+
<charset>utf-8</charset>
55+
</configuration>
56+
</execution>
57+
</executions>
58+
</plugin>
3859
</plugins>
3960
<finalName>spring-thymeleaf-2</finalName>
4061
</build>
4162

4263
<properties>
4364
<maven.compiler.source>1.8</maven.compiler.source>
4465
<maven.compiler.target>1.8</maven.compiler.target>
66+
<tomcat7-maven-plugin.version>2.2</tomcat7-maven-plugin.version>
4567
</properties>
4668
</project>

spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java renamed to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/arrays/ThymeleafArrayController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.thymeleaf.controller;
1+
package com.baeldung.thymeleaf.arrays;
22

33
import org.springframework.stereotype.Controller;
44
import org.springframework.ui.Model;

spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/BooleanExpressionsController.java renamed to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/booleanexpressions/BooleanExpressionsController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.thymeleaf.controller;
1+
package com.baeldung.thymeleaf.booleanexpressions;
22

33
import org.springframework.stereotype.Controller;
44
import org.springframework.ui.Model;

spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/model/Course.java renamed to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/customhtml/Course.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.thymeleaf.model;
1+
package com.baeldung.thymeleaf.customhtml;
22

33
import java.util.Date;
44

Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
package com.baeldung.thymeleaf.controller;
1+
package com.baeldung.thymeleaf.customhtml;
22

33
import org.springframework.stereotype.Controller;
44
import org.springframework.ui.Model;
55
import org.springframework.web.bind.annotation.ModelAttribute;
66
import org.springframework.web.bind.annotation.RequestMapping;
77
import org.springframework.web.bind.annotation.RequestMethod;
88

9-
import com.baeldung.thymeleaf.model.Course;
10-
119
/**
1210
* Handles requests for the student model.
1311
*
@@ -18,13 +16,13 @@ public class CourseRegistrationController {
1816
@RequestMapping(value = "/registerCourse", method = RequestMethod.POST)
1917
public String register(@ModelAttribute Course course, Model model) {
2018
model.addAttribute("successMessage", "You have successfully registered for course: " + course.getName() + ".");
21-
return "courseRegistration.html";
19+
return "templates/courseRegistration.html";
2220
}
2321

2422
@RequestMapping(value = "/registerCourse", method = RequestMethod.GET)
2523
public String register(Model model) {
2624
model.addAttribute("course", new Course());
27-
return "courseRegistration.html";
25+
return "templates/courseRegistration.html";
2826
}
2927

3028
}

spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/controller/ParticipantController.java renamed to spring-thymeleaf-2/src/main/java/com/baeldung/thymeleaf/requestparameters/ParticipantController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.baeldung.thymeleaf.controller;
1+
package com.baeldung.thymeleaf.requestparameters;
22

33
import org.springframework.stereotype.Controller;
44
import org.springframework.ui.Model;

0 commit comments

Comments
 (0)