和 POJO JavaBean

1.POJO

POJO (Plain Ordinary Java Object): POJO is a simple ordinary Java objects, it does not contain business logic or persistence logic, etc., but not a JavaBean, EntityBean, which does not have any special role and does not inherit or implement any other Java frameworks class or interface. Not load other types of property, and thus not subject to any restrictions.

2.JavaBean

Written in JAVA JavaBean is a reusable component. Is written in the JavaBean, and specific class must be public, and with no argument constructor. JavaBean by providing a common method in line with the consistency of design patterns will expose members of the internal domain property, acquired by the setter () and getter () method. As we all know, the attribute name in line with this model, and other Java classes can be found through the operation of these attributes JavaBean introspection mechanism (reflection).

Guess you like

Origin www.cnblogs.com/zxzhou/p/11685944.html