User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
java:splitapplicationcontextxmlintovariousfiles [2011/11/10 15:07]
rlunaro creado
java:splitapplicationcontextxmlintovariousfiles [2014/12/24 10:42] (current)
Line 1: Line 1:
 +====== Splitting Application Context into various files ======
 +I don't know if it is your case, but I were looking for this many time. I have a project where I have a "​tester"​ environment and a "​real"​ environment. The problem is I have to keep two applicationContext.xml files: one for the testing and another one for the real application. ​
 +I searched for a solution to this, and I never found this... until I bumped with this code. Just so easy!!! An "​import"​ tag!!! ​
 +Here is an example: ​
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<beans ...>
 +  <import resource="​applicationContext-beans.xml"/>​
 +  ​
java/splitapplicationcontextxmlintovariousfiles.txt ยท Last modified: 2014/12/24 10:42 (external edit)