User Tools

Site Tools


java:splitapplicationcontextxmlintovariousfiles

Differences

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] – creado rlunarojava:splitapplicationcontextxmlintovariousfiles [2022/12/02 22:02] (current) – external edit 127.0.0.1
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"/>
 +  
 +</beans>
 +
 +</code>
java/splitapplicationcontextxmlintovariousfiles.txt · Last modified: 2022/12/02 22:02 by 127.0.0.1