What makes the Spring framework a lightweight container?

前端 未结 5 763
说谎
说谎 2020-12-30 02:53

When people mention that Spring is a lightweight containter compared to other frameworks, do they mean? That it occupies less memory in the system or it does not have the op

5条回答
  •  一个人的身影
    2020-12-30 03:33

    Whether it is "lightweight" or "heavyweight", it is all about comparison. We consider Spring to be lightweight when we are comparing to normal J2EE container. It is lightweight in the sense of extra memory footprint for the facilities provided (e.g. Transaction Control, Life Cycle, Component dependency management)

    However, there are sometimes other criteria to compare for the "weight" of a container, e.g. intrusiveness in design and implementation; facilities provided etc.

    Ironically, Spring is sometimes treated as heavy weight container when compared to other POJO-based container, like Guice and Plexus.

提交回复
热议问题