Spring MVC, two instances of configuration instead of one

前端 未结 2 2101
别那么骄傲
别那么骄傲 2020-12-30 18:21

I\'m starting to learn about Spring MVC. I\'m trying to get rid of all Spring XML configuration. Here is my web.xml:



        
2条回答
  •  心在旅途
    2020-12-30 18:45

    I found that by including my @Configuration classes as a ContextConfigLocation in stead of identifying them through Component scanning, I avoid a memory leak where duplicate ListableBeanFactories would be created and lock up the Hibernate SessionFactory.

提交回复
热议问题