Skip to content

Instantly share code, notes, and snippets.

@netodevel
Created December 30, 2016 18:56
Show Gist options
  • Save netodevel/1531a1b9ed18242b44cf45709328cbfc to your computer and use it in GitHub Desktop.
Save netodevel/1531a1b9ed18242b44cf45709328cbfc to your computer and use it in GitHub Desktop.
package com.example;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SalarioMinimoController {
@GetMapping("/salarios")
@ResponseBody
public String index() {
return "index";
}
@GetMapping("/salarios/novo")
public String save(Model model, @ModelAttribute("salarioMinimo") SalarioMinimo salarioMinimo) {
return "save";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment