Hello everyone..i'm trying to use spring to develop a website..but I am stuck with this snippet..what is the difference between

@RequestMapping(value="/addBook",method=RequestMethod.GET)
    public ModelAndView Login() {
        ModelAndView model=new ModelAndView("addBook");
        return model;
    }

and this

@RequestMapping(value="/addBook",method=RequestMethod.GET)
    public String Login() {
        return "addBook"
    }

I'm really confused with this..don't both of them do the same job?? if not, could anyone please explain me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.