List of usage examples for org.springframework.web.bind.annotation RequestMethod GET
RequestMethod GET
To view the source code for org.springframework.web.bind.annotation RequestMethod GET.
Click Source Link
From source file:com.tsg.sitemapwebappmvc.controller.LuckyController.java
@RequestMapping(value = "/LuckyController", method = RequestMethod.GET) public String displayLuckyForm(HttpServletRequest req, Model model) { return "luckyindex"; }
From source file:nl.mok.mastersofcode.spectatorclient.controllers.CompetitionController.java
@RequestMapping(method = RequestMethod.GET, value = "/{id}") public ModelAndView showCompetition(final HttpServletRequest request, @PathVariable int id) { ModelAndView mav = new ModelAndView(); mav.addObject("page", new Object() { public String uri = "/spec/competition/" + id; public String redirect = request.getRequestURL().toString(); });/*from www. j av a 2s .c o m*/ mav.addObject("competition", DataController.getCompetitionById(id).orElse(null)); mav.addObject("currentCompetition", DataController.getCurrentCompetition()); mav.addObject("currentRound", DataController.getCurrentRound()); mav.setViewName("competition.twig"); return mav; }
From source file:edu.eci.cosw.restcontrollers.PedidosRest.java
@RequestMapping(value = "/{id}", method = RequestMethod.GET) public Pedido consped(@PathVariable int id) throws OperationFailedException { Pedido p = null;/*from ww w . j a v a 2 s. co m*/ if (sf.existePedido(id)) { p = sf.buscarPedidoPorId(id); } else { throw new OperationFailedException(); } return p; }
From source file:id.ac.ipb.ilkom.training.controller.HomeController.java
@RequestMapping(value = "/", method = RequestMethod.GET) public String home(Model model) { List<Product> products = productService.getProducts(0, 24); model.addAttribute("products", products); return "home"; }
From source file:com.dhenton9000.birt.controllers.ProductsController.java
@RequestMapping(method = RequestMethod.GET, path = "/all", produces = "application/json") @ApiOperation(value = "Get All Products", notes = "lists all Products at Classic Cars") public List<Products> getAllProducts() { return productsService.getAllProducts(); }
From source file:rest.UsuarioRestController.java
@RequestMapping(value = "/usuarios/", method = RequestMethod.GET) public ResponseEntity<List<UsuarioBean>> listAll() { List<UsuarioBean> usuarios = usuarioService.findAll(); if (usuarios.isEmpty()) { return new ResponseEntity<List<UsuarioBean>>(HttpStatus.NO_CONTENT); }/*from ww w . j av a 2 s . c om*/ return new ResponseEntity<List<UsuarioBean>>(usuarios, HttpStatus.OK); }
From source file:app.controller.adm.socio.socio.SocioController.java
@RequestMapping(method = RequestMethod.GET) public String index(Model model) { model.addAttribute("socios", service.list()); return "adm/socio/socio"; }
From source file:ua.aits.oblenergo_site.controller.MainController.java
@RequestMapping(value = { "/index", "/main", "/home" }, method = RequestMethod.GET) public ModelAndView index(HttpServletRequest request, HttpServletResponse response) throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException, ParseException { ModelAndView model = new ModelAndView("index"); return model; }
From source file:com.practice.web.controller.LoginController.java
@RequestMapping(value = "/login", method = RequestMethod.GET) public String getLoginPage(Model model) { Login login = new Login(); login.setUsername("admin"); model.addAttribute("login", login); return "login"; }
From source file:com.belajar_filter.controller.AdminController.java
@RequestMapping(value = "/says/{name}", method = RequestMethod.GET) public Map<String, Object> says(@PathVariable("name") String name) { log.info("name : " + name); Map<String, Object> res = new HashMap<>(); res.put("message", "hallo " + name); return res;/* w ww. j a v a 2 s.c o m*/ }