我按照https://spring.io/guides/tutorials/react-and-spring-data-rest/的文档构建一个使用 Spring 的 React 应用程序。spring 部分很好,直到到达建议使用插件安装 node 和 npm 模块的部分。我的问题是这个插件没有做它应该做的事情。我检查了文档并确定了一些执行(我真的不知道插件是如何工作的)。我介绍了这些执行,但我仍然看不到 React 应用程序在浏览器中的 localhost:8080 处渲染。
这是他们在 spring 文档中使用的插件。就这样。我希望任何遵循本教程的人都可以帮助我。
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
Run Code Online (Sandbox Code Playgroud)