windows 创建文件夹 链接

 mklink /j "G:\github\lvYouBaoBiao\ruoyi-admin\target\classes\static" "G:\github\lvYouBaoBiao\ruoyi-admin\src\main\resources\static"

创建链接后,spring boot 修改静态资源会立刻生效

如果用了 jrebel,需要修改 rebel.xml

<classpath>
    <dir name="G:/github/lvYouBaoBiao/ruoyi-admin/target/classes/com">
    </dir>
    <dir name="G:/github/lvYouBaoBiao/ruoyi-admin/target/classes/mapper">
    </dir>
</classpath>

原来的 classes 要修改为当前的目录,因为 jrebel 会删文件。。导致 static 和 templates 目录会被删除。。

猜你喜欢

转载自www.cnblogs.com/whm-blog/p/12101514.html