Example usage for org.springframework.web.bind.annotation RequestMethod GET

List of usage examples for org.springframework.web.bind.annotation RequestMethod GET

Introduction

In this page you can find the example usage for org.springframework.web.bind.annotation RequestMethod GET.

Prototype

RequestMethod GET

To view the source code for org.springframework.web.bind.annotation RequestMethod GET.

Click Source Link

Usage

From source file:com.yentini.servicios.otrapruebarest.controllers.RestController.java

@RequestMapping(value = "/person/", method = RequestMethod.GET)
@ResponseBody/*from ww  w.j av  a 2s . c om*/
public Person getPerson() {
    return new Person("Respuesta en formato dependiente del header de la peticin");
}

From source file:com.mum.controller.LoginController.java

@RequestMapping(value = "/loginfailed", method = RequestMethod.GET)
public String loginError(Model model) {
    model.addAttribute("error", true);
    return "login";
}

From source file:com.prongbang.webservice.controller.BookWebServiceController.java

@RequestMapping(value = "book", method = RequestMethod.GET)
public List<Book> list() {

    List<Book> books = new ArrayList<>();

    for (int i = 1; i <= 10; i++) {
        Book book = new Book();
        book.setId(i);/*  w ww  .  j a v a 2  s.  c o  m*/
        book.setName("Book " + i);
        book.setPrice(1000d * i);
        books.add(book);
    }
    return books;
}

From source file:$.ApiListController.java

@RequestMapping(method = RequestMethod.GET)
    public String list() {
        return "api/list";
    }

From source file:com.securejobs.web.JobseekerProfileController.java

@RequestMapping(method = RequestMethod.GET)
public String getCurrentPage(ModelMap model) {
    Persons person = new Persons();
    model.addAttribute(person);/*w  ww.jav a2  s  .  c om*/
    return "Jobseeker-MyProfile";
}

From source file:com.pgs.HelloWorldController.java

@RequestMapping(method = RequestMethod.GET)
public String sayHello(String name) {
    return MESSAGE;
}

From source file:controllers.AdminPanelController.java

@RequestMapping(method = RequestMethod.GET)
public String showForm(Map map, HttpSession session) throws SQLException {
    if (session.getAttribute("role") == null || !session.getAttribute("role").equals("admin")) {
        return "redirect: index.htm";
    }//from www. j  a  v  a2 s  .  c  o m
    List users = Factory.getInstance().getUserDAO().getAllUsers();
    map.put("users", users);
    return "adminpanel";
}

From source file:ru.mcdoker18.simulationdispatcher.controller.AuthorizationController.java

@RequestMapping(method = RequestMethod.GET)
public ModelAndView test(HttpServletResponse response) throws IOException {
    return new ModelAndView("authorization");
}

From source file:org.com.controller.CustomerController.java

@RequestMapping(value = "/cust", method = RequestMethod.GET)
public String getAllcust(Model m) {
    ArrayList<Ctype> lst = new ArrayList<>();
    CustomerDaoImpl cd = new CustomerDaoImpl();
    lst = cd.getAllCust();/*from   ww  w. j  a v a2 s. c o  m*/
    m.addAttribute("lst", lst);
    return "cust";
}

From source file:com.healthcit.cacure.web.controller.CadsrLookupController.java

@RequestMapping(method = RequestMethod.GET)
public ModelAndView showForm() {

    //TODO
    return new ModelAndView("?????");
}