I have this branch to add ui. The idea here is that vite builds the project and then sends it to /app/src/main/resources/static
. This works great except for one thing. When I run with npm run build:watch
I see /app/src/main/resources/static
get updated but the Spring app doesn't show the changes till I restart the server. Can I make it so that Gradle will update when the file updates?
Currently I am using IJ runner on Windows. I have to do this because I can't run the npm watch on wsl2. I tried gradle bootRun
but I don't see it working either.
I have this branch to add ui. The idea here is that vite builds the project and then sends it to /app/src/main/resources/static
. This works great except for one thing. When I run with npm run build:watch
I see /app/src/main/resources/static
get updated but the Spring app doesn't show the changes till I restart the server. Can I make it so that Gradle will update when the file updates?
Currently I am using IJ runner on Windows. I have to do this because I can't run the npm watch on wsl2. I tried gradle bootRun
but I don't see it working either.
1 Answer
Reset to default 0there is a stack overflow question similar to yours. You will get the answer to your question there. Check this out: Refreshing static content with Spring MVC and Boot I guess particularly these answers should be enough.
https://stackoverflow.com/a/76997426
https://stackoverflow.com/a/51411523