Spring MVC Web PetClinic Tutorial?

Posted by wuntee on Stack Overflow See other posts from Stack Overflow or by wuntee
Published on 2010-03-24T23:00:07Z Indexed on 2010/03/24 23:03 UTC
Read the original article Hit count: 503

Filed under:
|
|

Is there a tutorial that goes along with the PetClinic application? I have been trying to find one, but google is not helping me today. Specifically, I dont understand things like:

@Autowired - what does that even mean?

@RequestMapping(method = RequestMethod.GET)
public String setupForm(@RequestParam("petId") int petId, ModelMap model) {
    Pet pet = this.clinic.loadPet(petId);
    model.addAttribute("pet", pet);
    return "petForm";
}

How can a request return just a string? Shouldnt it need to return some sort of ModelAndView? Or does the application somehow redirect to whatever is returned?

A lot of confusing concepts - if there is a tutorial, or video (like spring-security has) that would be very helpful. Thanks.

© Stack Overflow or respective owner

Related posts about spring

Related posts about mvc