@@ -27,6 +27,38 @@ how to bind a list of objects as user's inputs in a Thymeleaf form.
27
27
</table >
28
28
29
29
![ AddBook] ( https://user-images.githubusercontent.com/11626327/84759059-33e01200-b001-11ea-81a2-3bfe4ad81b3c.JPG )
30
-
30
+
31
+ #
32
+
33
+ ## Project2-SpringBoot-Thymeleaf-Hibernate-Planet-Project
34
+
35
+ * Working with Enums in Thymeleaf
36
+ * Planet Project
37
+ Let's start by adding the Spring Boot starter for Thymeleaf to our pom.xml file:
38
+
39
+ <dependency>
40
+ <groupId>org.springframework.boot</groupId>
41
+ <artifactId>spring-boot-starter-thymeleaf</artifactId>
42
+ <versionId>RELEASE</versionId>
43
+ </dependency>
44
+ * We're going to be working with widgets that have a few choices of color, so let's define our Color enum:
45
+
46
+ public enum Solor {
47
+ MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, URANUS, NEPTUNE
48
+ }
49
+ * Now, let's create our Widget class:
50
+
51
+ public class Planet {
52
+ private String name;
53
+ private Solar solar;
54
+
55
+ // Standard getters/setters
56
+ }
57
+
58
+
59
+
60
+
31
61
Reference Materials
32
- 1 . https://www.baeldung.com/thymeleaf-list
62
+ 1 . https://www.baeldung.com/thymeleaf-list
63
+ 2 . https://frontbackend.com/thymeleaf/thymeleaf-tutorial
64
+
0 commit comments