Jul 27, 2020 in Spring

Can we have multiple Spring configuration files?

1 Answer

0 votes
Jul 27, 2020

For Spring MVC applications, we can define multiple spring context configuration files through contextConfigLocation. This location string can consist of multiple locations separated by any number of commas and spaces. For example;










We can also define multiple root level spring configurations and load it through context-param. For example;



<param-value>/WEB-INF/spring/root-context.xml /WEB-INF/spring/root-security.xml</param-value>


Another option is to use import element in the context configuration file to import other configurations, for example:

<beans:import resource="spring-jdbc.xml"/>

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

0 votes
Aug 13, 2020 in XML