File tree Expand file tree Collapse file tree
src/main/java/org/baeldung/thymeleaf/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88
99### Build the Project
10- ```
10+
1111mvn clean install
12- ```
1312
14- Access sample pages using the URLs:
15- http://localhost:8080/spring-thymeleaf/
16- http://localhost:8080/spring-thymeleaf/addStudent/
17- http://localhost:8080/spring-thymeleaf/listStudents/
13+ ### Run the Project
14+ mvn cargo: run
15+ - ** note** : starts on port '8082'
16+
17+ Access the pages using the URLs:
18+
19+ http://localhost:8082/spring-thymeleaf/
20+ http://localhost:8082/spring-thymeleaf/addStudent/
21+ http://localhost:8082/spring-thymeleaf/listStudents/
22+
23+ The first URL is the home page of the application. The home page has links to the other two pages.
Original file line number Diff line number Diff line change 2222 <maven-compiler-plugin .version>3.3</maven-compiler-plugin .version>
2323 <maven-war-plugin .version>2.6</maven-war-plugin .version>
2424 <maven-surefire-plugin .version>2.18.1</maven-surefire-plugin .version>
25+ <cargo-maven2-plugin .version>1.4.15</cargo-maven2-plugin .version>
2526 </properties >
2627 <dependencies >
2728 <!-- Spring -->
123124 </systemPropertyVariables >
124125 </configuration >
125126 </plugin >
127+ <plugin >
128+ <groupId >org.codehaus.cargo</groupId >
129+ <artifactId >cargo-maven2-plugin</artifactId >
130+ <version >${cargo-maven2-plugin.version} </version >
131+ <configuration >
132+ <wait >true</wait >
133+ <container >
134+ <containerId >jetty8x</containerId >
135+ <type >embedded</type >
136+ <systemProperties >
137+ </systemProperties >
138+ </container >
139+ <configuration >
140+ <properties >
141+ <cargo .servlet.port>8082</cargo .servlet.port>
142+ </properties >
143+ </configuration >
144+ </configuration >
145+ </plugin >
126146 </plugins >
127147 </build >
128148</project >
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class Student implements Serializable {
1515 private static final long serialVersionUID = -8582553475226281591L ;
1616
1717 @ NotNull (message = "Student ID is required." )
18- @ Min (value = 1000 , message = "Student ID must be atleast 4 digits." )
18+ @ Min (value = 1000 , message = "Student ID must be at least 4 digits." )
1919 private Integer id ;
2020
2121 @ NotNull (message = "Student name is required." )
You can’t perform that action at this time.
0 commit comments