Why does Spring MVC need at least two contexts?

前端 未结 3 822
遥遥无期
遥遥无期 2020-11-29 20:40

In Spring MVC, there are two contexts. One is the application context or global context which is booted up by ContextLoaderListener. It takes all the configurat

3条回答
  •  死守一世寂寞
    2020-11-29 21:25

    Check this answer About multiple containers in spring framework

    Yes ,you can have one context only.

    For code reuse it would be better to isolate services in Application Context rather then WebApplicationContext.but this not compulsion.you can keep only webApplicationcontext only.

提交回复
热议问题