-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HotSwapAgent doesn't reload resource files on change #252
Comments
I had a similar issue in my Spring Boot app. For some reason, it worked when I added my resource folder to the classpath like this:
|
If the .properties or .xml file are configuration of your application (not Spring etc.), then don't expect it will be reloaded - there must be additional supporting mechanism like clear already read configuration structures etc. What kind of .properties .xml are you meaning? |
I'm trying to hotswap |
I too have this issue in my simple Spring Boot Application.
And my hotswap-agent.properties is like below extraClasspath=src/main/resources, target/classes
watchResources=src/main/resources
disabledPlugins=
autoHotswap=true
spring.basePackagePrefix=
LOGGER=debug I can see in the log Registering resource listener on classpath URI HOTSWAP AGENT: 18:03:51.745 DEBUG (org.hotswap.agent.annotation.handler.WatchHandler) - Registering resource listener on classpath URI file:/home/ngm/NetBeansProjects/ocr/src/main/resources/
HOTSWAP AGENT: 18:03:51.747 DEBUG (org.hotswap.agent.watch.nio.WatcherNIO2) - Registering directory /home/ngm/NetBeansProjects/ocr/src/main/resources
HOTSWAP AGENT: 18:03:51.756 DEBUG (org.hotswap.agent.annotation.handler.WatchHandler) - Registering resource listener on classpath URI file:/home/ngm/NetBeansProjects/ocr/target/classes/
HOTSWAP AGENT: 18:03:51.757 DEBUG (org.hotswap.agent.watch.nio.WatcherNIO2) - Registering directory /home/ngm/NetBeansProjects/ocr/target/classes and when i do any edits on my static files i get
So , I guess watching the resources are working but when we start to refresh the page to see the updated index.html it is still showing same old one. Thanks |
I think i found the resources are working back again. I used netbeans to do this . The commandline that nebeans used was :
After i changed the index.html i got
and it quickly updated so fast and I am loving it. It was not working before but now it is working. I don't know why. |
Thanks @privatejava! |
My setup:
VM arguments in
CATALINA_OPTS
iswatchResources
inhotswap-agent.properties
is set as:I'm running my web application on a standalone Tomcat server, and debugging via Eclipse. Class redefinition works great, and has been a huge time saver.
In case of resource files, I see messages on the console like
But resource files like
.properties
and.xml
files don't reload on change. Please help me figure out what's going wrong.The text was updated successfully, but these errors were encountered: