Spring 3.0.0 Release Candidate 1发布
程序员文章站
2022-04-20 21:13:31
...
This news just in from Arjen Poutsma's twitter feed: Spring 3.0.0.RC1 is now available.
http://s3.amazonaws.com/dist.springframework.org/milestone/SPR/spring-framework-3.0.0.RC1-with-docs.zip
新的Validator不错
Spring 3 Validation
http://s3.amazonaws.com/dist.springframework.org/milestone/SPR/spring-framework-3.0.0.RC1-with-docs.zip
新的Validator不错
Spring 3 Validation
public class Person { @NotNull @Max(64) private String name; @Min(0) private int age; }
@Controller public class MyController { @InitBinder protected void initBinder(WebDataBinder binder) { binder.setValidator(new FooValidator()); } Spring Framework 3.0.0.RC1 Reference Documentation 143 @RequestMapping("/foo", method=RequestMethod.POST) public void processFoo(@Valid Foo foo) { ... } }
<!-- Invokes Spring MVC @Controller methods --> <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"> <property name="webBindingInitializer"> <!-- Configures Spring MVC DataBinder instances --> <bean class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer"> <property name="validator" ref="validator" /> </bean> </property> </bean> <!-- Creates the JSR-303 Validator --> <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" />
推荐阅读
-
iOS/iPadOS 14.7 Release Candidate 候选版本正式发布
-
spring-boot-plus后台快速开发框架1.0.0.RELEASE发布了
-
【翻译 Spring 5.0.4.RELEASE】1.The IoC container
-
BlackTie 3.0.0.M1 发布
-
spring-boot-plus后台快速开发框架1.0.0.RELEASE发布了
-
Spring Integration 2.0.0.M1发布,企业应用集成框架
-
Spring Python 1.2.0.RC1 发布
-
Spring Security 3.2 M1发布,Spring 应用安全框架
-
Spring 3.0.0 Release Candidate 1发布
-
Spring Framework 4.0M1 & 3.2.3 发布了[翻译]