6.4 Bean operations and BeanWrapper Class 2, beanbeanwrapper

Source: Internet
Author: User

6.4 Bean operations and BeanWrapper Class 2, beanbeanwrapper
Built-in PropertyEditor implementation

Spring uses the concept of PropertyEditors to convert objects and strings. If you consider it (PropertyEditors), it is sometimes easier to use it to indicate properties than the object itself. For example, a Date can be expressed as a human readable (as a String '2017-14-09 '), and we can also convert it to the original Date (or better: converts any input readable Date to a Date object ). This can be achieved by registering custom editors (java. beans. PropertyEditor type. By registering custom editors on a BeanWrapper or in a given IoC container, you can tell it (BeanWrapper) how to convert attributes to the desired type. You can read this in Javadoc of the java. bens package.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.