What is container in spring framework?

前端 未结 5 1590
南旧
南旧 2021-02-01 04:30
  1. I was going through this article http://www.vaannila.com/spring/spring-ioc-1.html and here the term container is used. The diagram below shows container. What is contai

5条回答
  •  醉酒成梦
    2021-02-01 05:05

    In this context, a container has the meaning of something that provides an infrastructrure needed by some components to live.

    You can imagine it this way:

    • Like the JVM is a container to run Java Programs,
    • A servlet container (i.e. Tomcat) is the thing that runs servlets
    • An EJB-Container is the environmet where EJB live (see this wikipedia article (in german, but you can use your browser translator))

    The same way Spring is the container where Spring Beans live.

提交回复
热议问题