본문 바로가기

내가 당면한 문제와 해결방안

spring

POJO vs Java Bean

POJO  JAVA BEAN

It doesn’t have special restrictions other than those forced by Java language. It is a special POJO which have some restrictions.
It doesn’t provide much control on members. It provides complete control on members.
It can implement Serializable interface. It should implement serializable interface.
Fields can be accessed by their names. Fields are accessed only by getters and setters.
Fields can have any visiblity. Fields have only private visiblity.
There can be a no-arg constructor. It must have a no-arg constructor.
It is used when you don’t want to give restriction on your members and give user complete access of your entity It is used when you want to provide user your entity but only some part of your entity.

 

 

참고

(https://dzone.com/articles/difference-between-beanfactory-and-applicationcont)
(https://www.geeksforgeeks.org/pojo-vs-java-beans/)

'내가 당면한 문제와 해결방안' 카테고리의 다른 글

elasticsearch geo queries  (0) 2019.09.06
couchbase  (0) 2019.08.29
python for iterate loop check next item  (0) 2019.07.31
crawling wikipedia  (0) 2019.07.31
RestController랑 그냥 Controller  (0) 2019.07.26