note
http://www.open-open.com/lib/view/open1330670747561.html
No mapping found for HTTP request with URI [/testFlex/tryRavis.html] in Disp
http://www.cnblogs.com/johnason/archive/2012/07/18/2597456.html
org.springframework.web.servlet.PageNotFound - Request method 'GET' not supported
package net.spring.controller;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement;
import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody;
@Controller @RequestMapping("/Flex")
public class testFlex {
@RequestMapping(value = "/test1.do") @ResponseBody public static String test() { User user=new User(); user.setName("laura"); user.setPassword("111"); System.out.println("here now~~"); //return user; return "test"; } public static void main(String args[]){ test(); } }
@XmlRootElement (name="user") class User{ private String name; private String password; @XmlElement public String getName(){ return name; } public void setName(String name){ this.name=name; } @XmlElement public String getPassword(){ return password;
} public void setPassword(String password){ this.password=password; } }