Can I compose a Spring Configuration File from smaller ones?

前端 未结 7 1934
后悔当初
后悔当初 2021-02-13 02:38

I have a handful of projects that all use one project for the data model. Each of these projects has its own applicationContext.xml file with a bunch of repetitive data stuff w

7条回答
  •  一向
    一向 (楼主)
    2021-02-13 03:13

    We do this in our projects at work, using the classpath* resource loader in Spring. For a certain app, all appcontext files containing the application id will be loaded:

    classpath*:springconfig/spring-appname-*.xml
    

提交回复
热议问题