【发布时间】:2017-12-29 17:55:18
【问题描述】:
我正在玩这个教程: https://spring.io/guides/tutorials/react-and-spring-data-rest/
这很有趣,进入spring boot,data,rest和react,但我一直在玩这个问题:编辑Javascript后,必须重新启动spring应用程序并清空浏览器的缓存。
作者建议:“想看到你的 JavaScript 自动变化吗?运行 npm run-script watch 让 webpack 进入监视模式。它会在你编辑源代码时重新生成 bundle.js。”但是如果js源有效地自动重建,spring app中“运行”的js并没有更新,app也没有重启……
看来解决的办法应该是把boot应用项目改成war项目,这样在src/main/webapp下修改的资源会在eclipse内嵌的tomcat中自动更新...
有人已经解决了这个问题?
【问题讨论】:
标签: spring eclipse reactjs spring-boot spring-data-rest