From e90737e54fa1e1ffe34d0d79844973ef83208086 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 3 May 2018 13:45:14 +0100 Subject: [PATCH 01/29] Add files via upload --- .../WorkingWithArraysInThymeleafApplication.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java new file mode 100644 index 0000000000..d15e14ef35 --- /dev/null +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -0,0 +1,12 @@ +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); + } +} From 0c609288a60130c3896bacd9690bb497751cc148 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 3 May 2018 14:04:44 +0100 Subject: [PATCH 02/29] Delete WorkingWithArraysInThymeleafApplication.java --- .../WorkingWithArraysInThymeleafApplication.java | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java 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 d15e14ef35..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); - } -} From 936dc5e346da30509dfede38e3f30ccc1a06bcfd Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 12:38:20 +0100 Subject: [PATCH 03/29] Add files via upload --- .../thymeleaf/controller/ArrayController.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java new file mode 100644 index 0000000000..e36dcdf092 --- /dev/null +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java @@ -0,0 +1,25 @@ +package com.baeldung.thymeleaf.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class ArrayController { + @GetMapping("/") + public String arrayController(Model model) { + String[] continents = new String[7]; + + continents[0] = "Africa"; + continents[1] = "Antarctica"; + continents[2] = "Assia"; + continents[3] = "Australia"; + continents[4] = "Europe"; + continents[5] = "North America"; + continents[6] = "Sourth America"; + + model.addAttribute("continents", continents); + + return "continents"; + } +} From 77227cdc9fb215c56404a210ae89976833a16ed5 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 12:43:28 +0100 Subject: [PATCH 04/29] Create continents.html --- .../main/resources/templates/continents.html | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 spring-thymeleaf/src/main/resources/templates/continents.html diff --git a/spring-thymeleaf/src/main/resources/templates/continents.html b/spring-thymeleaf/src/main/resources/templates/continents.html new file mode 100644 index 0000000000..d170ccae23 --- /dev/null +++ b/spring-thymeleaf/src/main/resources/templates/continents.html @@ -0,0 +1,48 @@ + + + +Arrays in Thymeleaf + + + + +

THE CONTINENTS

+

+ We have a total of + continents in this world. Following is a list showing their order + based on the number of population in each of them. +

+ +
    +
  1. +
  2. +
  3. +
  4. +
  5. +
  6. +
  7. +
+ + + +

+ +

+ The greatest + continents. +

+ +

+ Europe is a continent: . +

+ +

+ Array of continents is empty . +

+ + + Date: Thu, 10 May 2018 12:45:35 +0100 Subject: [PATCH 05/29] Add files via upload --- .../WorkingWithArraysInThymeleafApplication.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java new file mode 100644 index 0000000000..d15e14ef35 --- /dev/null +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -0,0 +1,12 @@ +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); + } +} From c3c8b73e2146de89f7f2002653a27e9368377c6c Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 12:51:25 +0100 Subject: [PATCH 06/29] Update pom.xml --- spring-thymeleaf/pom.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index d13356b3d7..e74f7c2300 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -98,6 +98,13 @@ ${springframework-security.version} test + + + org.springframework.boot + spring-boot-autoconfigure + 2.0.1.RELEASE + jar + @@ -173,4 +180,4 @@ 2.2 - \ No newline at end of file + From 517b6d4bc8ea7f63ab991be8a989d43bae1f3dd0 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 13:10:34 +0100 Subject: [PATCH 07/29] Update pom.xml --- spring-thymeleaf/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index e74f7c2300..8add2a850c 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -99,12 +99,12 @@ test - + From ddd6019631c5f8be849067a1356447996121d558 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 13:11:24 +0100 Subject: [PATCH 08/29] Update WorkingWithArraysInThymeleafApplication.java --- ...orkingWithArraysInThymeleafApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java index d15e14ef35..bce0660fda 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -1,12 +1,12 @@ -package com.baeldung.thymeleaf; +// package com.baeldung.thymeleaf; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; +// import org.springframework.boot.SpringApplication; +// import org.springframework.boot.autoconfigure.SpringBootApplication; -@SpringBootApplication -public class WorkingWithArraysInThymeleafApplication { +// @SpringBootApplication +// public class WorkingWithArraysInThymeleafApplication { - public static void main(String[] args) { - SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); - } -} +// public static void main(String[] args) { +// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); +// } +// } From 300d6000dbd16fa24ef56cf154808615f496c111 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 13:12:33 +0100 Subject: [PATCH 09/29] Update ArrayController.java From 26521fb2ff58fce02fd5471e087743b1e2457225 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 13:13:58 +0100 Subject: [PATCH 10/29] Update continents.html --- .../main/resources/templates/continents.html | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/spring-thymeleaf/src/main/resources/templates/continents.html b/spring-thymeleaf/src/main/resources/templates/continents.html index d170ccae23..849f479413 100644 --- a/spring-thymeleaf/src/main/resources/templates/continents.html +++ b/spring-thymeleaf/src/main/resources/templates/continents.html @@ -1,48 +1,48 @@ - -Arrays in Thymeleaf - - - - -

THE CONTINENTS

-

- We have a total of - continents in this world. Following is a list showing their order - based on the number of population in each of them. -

+ + Arrays in Thymeleaf + + + + +

THE CONTINENTS

+

+ We have a total of + continents in this world. Following is a list showing their order + based on the number of population in each of them. +

-
    -
  1. -
  2. -
  3. -
  4. -
  5. -
  6. -
  7. -
+
    +
  1. +
  2. +
  3. +
  4. +
  5. +
  6. +
  7. +
-
    -
  • -
+
    +
  • +
-

+

-

- The greatest - continents. -

+

+ The greatest + continents. +

-

- Europe is a continent: . -

+

+ Europe is a continent: . +

-

- Array of continents is empty . -

+

+ Array of continents is empty . +

- + Date: Thu, 10 May 2018 14:23:43 +0100 Subject: [PATCH 11/29] Delete ArrayController.java --- .../thymeleaf/controller/ArrayController.java | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java deleted file mode 100644 index e36dcdf092..0000000000 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ArrayController.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.baeldung.thymeleaf.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; - -@Controller -public class ArrayController { - @GetMapping("/") - public String arrayController(Model model) { - String[] continents = new String[7]; - - continents[0] = "Africa"; - continents[1] = "Antarctica"; - continents[2] = "Assia"; - continents[3] = "Australia"; - continents[4] = "Europe"; - continents[5] = "North America"; - continents[6] = "Sourth America"; - - model.addAttribute("continents", continents); - - return "continents"; - } -} From 5deaa416e61a58200f9e5780993cb848b5fe7321 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 14:24:55 +0100 Subject: [PATCH 12/29] Add files via upload --- .../controller/ThymeleafArrayController.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java new file mode 100644 index 0000000000..789c87d870 --- /dev/null +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java @@ -0,0 +1,25 @@ +package com.baeldung.thymeleaf.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; + +@Controller +public class ThymeleafArrayController { + @GetMapping("/") + public String arrayController(Model model) { + String[] continents = new String[7]; + + continents[0] = "Africa"; + continents[1] = "Antarctica"; + continents[2] = "Assia"; + continents[3] = "Australia"; + continents[4] = "Europe"; + continents[5] = "North America"; + continents[6] = "Sourth America"; + + model.addAttribute("continents", continents); + + return "continents"; + } +} From bc4594dacfa21ab99bc67fed2b80215e698cec1b Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 14:43:41 +0100 Subject: [PATCH 13/29] Update ThymeleafArrayController.java --- .../baeldung/thymeleaf/controller/ThymeleafArrayController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java index 789c87d870..5732827a3e 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping; @Controller public class ThymeleafArrayController { - @GetMapping("/") + @GetMapping("/arrays") public String arrayController(Model model) { String[] continents = new String[7]; From 8aad495404f8a65f7e98a8dcb2bbeb11248d8c64 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 15:56:45 +0100 Subject: [PATCH 14/29] Update continents.html --- spring-thymeleaf/src/main/resources/templates/continents.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-thymeleaf/src/main/resources/templates/continents.html b/spring-thymeleaf/src/main/resources/templates/continents.html index 849f479413..0e7ffa3f58 100644 --- a/spring-thymeleaf/src/main/resources/templates/continents.html +++ b/spring-thymeleaf/src/main/resources/templates/continents.html @@ -5,6 +5,7 @@ +

THE CONTINENTS

@@ -45,4 +46,4 @@

- From 012bf35ffd7a24b107bc8b1ad6af879efd5e7be6 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 15:57:46 +0100 Subject: [PATCH 15/29] Update pom.xml --- spring-thymeleaf/pom.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index 8add2a850c..a914a6d27e 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -99,12 +99,13 @@ test
- + + From 4e4b65c2fcc71158439b60f6905f5c69c62b5e0e Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Thu, 10 May 2018 15:58:29 +0100 Subject: [PATCH 16/29] Update WorkingWithArraysInThymeleafApplication.java --- ...orkingWithArraysInThymeleafApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java index bce0660fda..d15e14ef35 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -1,12 +1,12 @@ -// package com.baeldung.thymeleaf; +package com.baeldung.thymeleaf; -// import org.springframework.boot.SpringApplication; -// import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; -// @SpringBootApplication -// public class WorkingWithArraysInThymeleafApplication { +@SpringBootApplication +public class WorkingWithArraysInThymeleafApplication { -// public static void main(String[] args) { -// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); -// } -// } + public static void main(String[] args) { + SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); + } +} From 86b4b39852eec2798c30ebad0566f1073563860c Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 09:38:11 +0100 Subject: [PATCH 17/29] Update WorkingWithArraysInThymeleafApplication.java --- ...orkingWithArraysInThymeleafApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java index d15e14ef35..bce0660fda 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -1,12 +1,12 @@ -package com.baeldung.thymeleaf; +// package com.baeldung.thymeleaf; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; +// import org.springframework.boot.SpringApplication; +// import org.springframework.boot.autoconfigure.SpringBootApplication; -@SpringBootApplication -public class WorkingWithArraysInThymeleafApplication { +// @SpringBootApplication +// public class WorkingWithArraysInThymeleafApplication { - public static void main(String[] args) { - SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); - } -} +// public static void main(String[] args) { +// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); +// } +// } From 460c314d986b39809f663afff452d03ceb67630b Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 09:39:56 +0100 Subject: [PATCH 18/29] Update pom.xml --- spring-thymeleaf/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index a914a6d27e..e05564abd8 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -99,12 +99,12 @@ test - + From a4c502058208513bd8b5924d988bddb7f3105691 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 09:42:28 +0100 Subject: [PATCH 19/29] Update continents.html From c510a4e72ee562bff2c76614740810828f28f391 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 09:49:12 +0100 Subject: [PATCH 20/29] Update pom.xml --- spring-thymeleaf/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index e05564abd8..a914a6d27e 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -99,12 +99,12 @@ test - + From 08d5edba2ff6a049b7faa6d239ebb26d96c9ffdf Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 09:58:14 +0100 Subject: [PATCH 21/29] Update WorkingWithArraysInThymeleafApplication.java --- ...orkingWithArraysInThymeleafApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java index bce0660fda..d15e14ef35 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -1,12 +1,12 @@ -// package com.baeldung.thymeleaf; +package com.baeldung.thymeleaf; -// import org.springframework.boot.SpringApplication; -// import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; -// @SpringBootApplication -// public class WorkingWithArraysInThymeleafApplication { +@SpringBootApplication +public class WorkingWithArraysInThymeleafApplication { -// public static void main(String[] args) { -// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); -// } -// } + public static void main(String[] args) { + SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); + } +} From ab93b6272fa9e499301016bfbe40667adecc3ce9 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 10:19:59 +0100 Subject: [PATCH 22/29] Update pom.xml --- spring-thymeleaf/pom.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index a914a6d27e..d496addb87 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -106,6 +106,17 @@ jar + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-web + + @@ -158,6 +169,14 @@ + + + + org.springframework.boot + spring-boot-maven-plugin + + + From a9827c6becd89669e8c721d06732bccfe542ba25 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 10:21:15 +0100 Subject: [PATCH 23/29] Update WorkingWithArraysInThymeleafApplication.java From 22ee523b8eca254a6ecf44e768673c99aada3b33 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 10:35:49 +0100 Subject: [PATCH 24/29] Update pom.xml --- spring-thymeleaf/pom.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index d496addb87..d4fcfe5f14 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -113,9 +113,9 @@ - org.springframework.boot - spring-boot-starter-web - + org.springframework.boot + spring-boot-starter-web + @@ -129,6 +129,7 @@ false + org.codehaus.cargo cargo-maven2-plugin @@ -148,6 +149,7 @@ + org.apache.tomcat.maven tomcat7-maven-plugin @@ -168,15 +170,13 @@ + + + org.springframework.boot + spring-boot-maven-plugin + + - - - - org.springframework.boot - spring-boot-maven-plugin - - - From 7ceb31f3407d7f09d6ce5179133d3b028c908350 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 10:44:54 +0100 Subject: [PATCH 25/29] Update pom.xml --- spring-thymeleaf/pom.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index d4fcfe5f14..68fa28018e 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -170,12 +170,6 @@ - - - org.springframework.boot - spring-boot-maven-plugin - -
From fdaa866ffab470ef7595aef9f06d8651f3df465f Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 10:52:20 +0100 Subject: [PATCH 26/29] Update pom.xml --- spring-thymeleaf/pom.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index 68fa28018e..b774c453be 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -111,12 +111,7 @@ spring-boot-starter-test test - - - org.springframework.boot - spring-boot-starter-web - - + From a27ef5a9a755f647827174256f5998fde00edc5f Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 11:06:43 +0100 Subject: [PATCH 27/29] Update pom.xml --- spring-thymeleaf/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index b774c453be..81ff93f013 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -99,7 +99,7 @@ test - + From c2d37e99e13bd5622dfe9180597db08123e58a3d Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 11 May 2018 11:08:48 +0100 Subject: [PATCH 28/29] Update WorkingWithArraysInThymeleafApplication.java --- ...orkingWithArraysInThymeleafApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java index d15e14ef35..bce0660fda 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/WorkingWithArraysInThymeleafApplication.java @@ -1,12 +1,12 @@ -package com.baeldung.thymeleaf; +// package com.baeldung.thymeleaf; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; +// import org.springframework.boot.SpringApplication; +// import org.springframework.boot.autoconfigure.SpringBootApplication; -@SpringBootApplication -public class WorkingWithArraysInThymeleafApplication { +// @SpringBootApplication +// public class WorkingWithArraysInThymeleafApplication { - public static void main(String[] args) { - SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); - } -} +// public static void main(String[] args) { +// SpringApplication.run(WorkingWithArraysInThymeleafApplication.class, args); +// } +// } From 1d94492e2992aacc2fdabd98dd47fb7fa11c7d21 Mon Sep 17 00:00:00 2001 From: jabyte <32500012+jabyte@users.noreply.github.com> Date: Fri, 18 May 2018 11:04:20 +0100 Subject: [PATCH 29/29] Array declared and initialized in one line. --- .../controller/ThymeleafArrayController.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java index 5732827a3e..8276cc4376 100644 --- a/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java +++ b/spring-thymeleaf/src/main/java/com/baeldung/thymeleaf/controller/ThymeleafArrayController.java @@ -8,16 +8,8 @@ import org.springframework.web.bind.annotation.GetMapping; public class ThymeleafArrayController { @GetMapping("/arrays") public String arrayController(Model model) { - String[] continents = new String[7]; - - continents[0] = "Africa"; - continents[1] = "Antarctica"; - continents[2] = "Assia"; - continents[3] = "Australia"; - continents[4] = "Europe"; - continents[5] = "North America"; - continents[6] = "Sourth America"; - + String[] continents = {"Africa", "Antarctica", "Asia", "Australia", "Europe", "North America", "Sourth America"}; + model.addAttribute("continents", continents); return "continents";