Add files via upload
This commit is contained in:
parent
0c609288a6
commit
936dc5e346
|
@ -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";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue