How to import Java-config class into XML-config so that both contexts have beans?

前端 未结 3 1805
青春惊慌失措
青春惊慌失措 2020-12-01 04:52

I have a project where I need to bootstrap @Configuration java-config classes into the XML configuration.

To do that, I\'m reading that I also need to include the fo

3条回答
  •  爱一瞬间的悲伤
    2020-12-01 05:41

    Alternatively to annotation-config you can use component-scan. Then you do not have to include the Configuration Bean in XML:

    
    

    See Difference between vs for more details.

提交回复
热议问题