It looks like you want to find "hotdeploy".
What you are asking for is not a Spring function, but rather a JVM function and an application server. The application server can see that your classes have actually changed and with some clever ClassLoader cheat, it can load new versions into the runinng JVM as they become available. Java was not really designed to work in such a way that there are some problems (ClassLoader, memory leak, hotdeploy - good keywords to find more about potential problems and possible solutions). I would not recommend this for use in production, but it can be useful during development.
Since this is a feature of application servers, the actual data depends on the specific application server and is explained in it by the documentation.
If you just want some kind of magic plugin and not the actual hotdeploy, there are other things you could do. Custom ClassLoader can load classes from any source (file, network, database ..) that you want, and then you can create instances and use them with reflection. (This is what happens when you deploy a war with Tomcat / JBoss or something else). Access and dynamic reloading of non-class resources in jar / war files is easier.
source share