Spring Json View之快速开始(二)
快速开始-用SimpleForm-Controller提交GET/POST请求
?
?Command-Controller提供一个完整的CommandBean,Spring对它提供校验和绑定支持。这个示例在Command-Controller中返回一个Model-Map的Json字符串,json视图返回信息中包含字段错误、全局错误和绑定。支持CommandBean属性类型的转换。
?
详细信息参见文档
?
Spring ApplicationContext
?
?
Spring view.xml
?
JavaScript behaviour-roles.js
?
CommandBean
??
Response-Status : 311{ "failure":"true", "exception.message":"java.lang.Exception: You throw an exeption !", "exception.stacktrace": "java.lang.Exception: You throw an exeption ! \n\tat org.thing.spring.json.controller.[...] \n\tat org.springframework.web.servlet.mvc.[...] [...]"}