我刚刚使用 Angular 4 启动了一个 Spring Boot 项目。对于 Angular,我可以运行npm start
以便 NPM 编译每个更改。但我不知道如何为 Spring Boot 做到这一点。我可以找到一些 Eclipse/IntelliJ 的源代码,但我想继续使用我的 Visual Studio Code 编辑器。
有点晚了,但我正在寻找同样的东西并到达这里。
也许这对其他人有用。
答案在 spring 的文档中。
阅读此处:
https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html https://docs.spring.io/spring-boot/docs/current/reference/html/howto-hotswapping.html
然后这里:
https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html
如果您的链接有问题...
如果您使用 Maven,只需在 pom 中添加此依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
或者,如果您使用 Gradle:
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
}
我希望这可以帮助别人。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)