领先一步
VMware 提供培训和认证,以加速您的进步。
了解更多欢迎回到本周 Spring 的另一个篇章。
我们有很多内容要介绍,所以让我们开始吧!
@Controller
类处理程序方法中,确保 `BindingResult` 参数紧跟在模型或命令参数之后,如下所示 <CODE>@RequestMapping(...) public String handleRequest( @ModelAttribute @Valid YourCustomPojo attempt, BindingResult result)</code>.
In this example, <CODE>handleRequest</Code> will validate the POJO (<CODE>YourCustomPojo</code>) - checking the POJO for JSR303-annotations and attempting to apply the constraints because the POJO is annotated with <CODE>@Valid</CODE> - and stash any errors in the <CODE>BindingResult</code>, which it makes available if we ask for it.
@SpelAssert
,其作用类似于 JSR303 的 @ScriptAssert
。</LI>
<LI> The <EM>Java J2EE SOA Key Points</EM> blog has a nice post on
<A href="http://stlarch.blogspot.com/2013/03/spring-ws-jaxb-web-sevice-client.html">using the Spring WS JAXB web service client</a>. There's very little narrative, but lots of code.
</LI>