Add files via upload

This commit is contained in:
jabyte 2018-05-10 14:24:55 +01:00 committed by GitHub
parent 6d7d894d25
commit 5deaa416e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 0 deletions

View File

@ -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";
}
}