Why is it difficult for you to do this when it is a deployment problem. Most containers deploy WARs in the form of "exploded," which means that somewhere in your file system there is a spring.xml file.
If you want to update this, you can just find the actual location and then copy the new spring.xml on top of the old one. However, at the same time, your WAR remains the most "source of truth."
WARs are generally very easy to use and deploy, so there is an advantage in combining your configuration as much as possible in a WAR.
So, you can update spring.xml by going over the back of the container and directly editing (or copying) it.
Finally, having spring.xml outside of your WAR means that it is available for ALL of your WARS, and if you decide to add another WAR to your system later, it will probably be difficult to parse the two files because they are not tied to a specific war for a long time .
Will hartung
source share