3f8d0ddb2b062a423ba003c7d9cc60991d443181
[demos/spring-boot] / src / main / java / de / juplo / demo / DemoController.java
1 package de.juplo.demo;
2
3
4 import lombok.extern.slf4j.Slf4j;
5 import org.springframework.stereotype.Controller;
6 import org.springframework.web.bind.annotation.ModelAttribute;
7 import org.springframework.web.bind.annotation.RequestMapping;
8
9
10 /**
11  * Controller to demonstrate the behavior of checkboxes
12  * @author Kai Moritz
13  */
14 @Controller
15 @Slf4j
16 public class DemoController
17 {
18   @RequestMapping("/")
19   public String display(@ModelAttribute Form form)
20   {
21     log.info("option={}, inner={}", form.option, form.inner.option);
22     return "form";
23   }
24 }