最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

spring - Why is Gradle not showing the latest srcmainresourcesstatic after updating? - Stack Overflow

programmeradmin2浏览0评论

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.

Share Improve this question asked Feb 7 at 15:48 JackieJackie 23.5k41 gold badges169 silver badges327 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

there 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

发布评论

评论列表(0)

  1. 暂无评论