Java Spring multiple ApplicationContext

前端 未结 6 1746
一生所求
一生所求 2020-12-07 14:51

The definition of the spring ApplicationContext is very ambiguous, I almost finish a whole book of tutorial but still cannot understand what is the Applic

6条回答
  •  温柔的废话
    2020-12-07 15:51

    You added a "java-ee" tag. Spring is often used in web applications running on a application server. Typically each web application would have it's own application. The web applications are separated and probably that is what is called container in the documentation as you cannot regularly share variables with different applications / containers.

    You can have two contexts within an application. If you have two contexts each will have its own singleton.

提交回复
热议问题