interface Validator undestanding spring oval intergration is supper easy. Anyway it doesn't matter you have any experiance on that or not you will understand how spring oval intergration can do at with this tutorial.
- Oval what is oval?
- Oval validation
- spring support
- oval class API
Need of a validator interface
public interface Validator {
boolean supports(Class clazz);
void validate(Object target, Errors errors);
}
Spring API to validate
Add this to your bean configuration file. Replace the highlighted configuration files with your ones.
<bean id="validator" class="net.sf.oval.integration.spring.SpringValidator">
<constructor-arg>
<bean id="validator" class="net.sf.oval.Validator">
<constructor-arg>
<util:list>
<bean class="net.sf.oval.configuration.xml.XMLConfigurer">
<constructor-arg>
<value type="java.io.InputStream">classpath:com/test/validation/oval1-config.xml</value>
</constructor-arg>
</bean>
<bean class="net.sf.oval.configuration.xml.XMLConfigurer">
<constructor-arg>
<value type="java.io.InputStream">classpath:com/test/validation/oval2-config.xml</value>
</constructor-arg>
</bean>
</util:list>
</constructor-arg>
</bean>
</constructor-arg>
</bean>
The class net.sf.oval.integration.spring.SpringValidator provides an implementation of Spring's org.springframework.validation.Validatorinterface and thus can be used for Spring Validation.
5 comments:
Amazing & Great informative blog,it gives very useful practical information to developer like me. Besides that Wisen has established as Best Java Online Training India . or learn thru Online Training mode Java Online Training From India . Nowadays Hibernate ORM has tons of job opportunities on various vertical industry.
This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
best rpa training in bangalore
rpa training in bangalore | rpa course in bangalore
RPA training in bangalore
rpa training in chennai
rpa online training
All the points you described so beautiful. Every time i read your i blog and i am so surprised that how you can write so well.
Python training in bangalore
Python course in pune
Python training in bangalore
Thank you for sharing your info. I really appreciate your efforts and I am waiting for your next post thank you once again.
AWS certification course in Chennai
Post a Comment