Exemplo Básico Spring 3(JSP)
publicado em 29 Jul 2010 20:04 por Munif Gebara Junior
@Controller
public class CadastroPessoa extends MultiActionController {
private CadastroServices cadastroServices;
@Autowired(required = true)
public void setCadastroServices(CadastroServices cadastroServices) {
this.cadastroServices = cadastroServices;
}
public ModelAndView lista(HttpServletRequest request, HttpServletResponse response) {
ModelAndView mv = new ModelAndView("paginaPessoa");
mv.addObject("li", cadastroServices.listaPessoa());
mv.addObject("lc", cadastroServices.listaCidadesBanco());
return mv;
}
...