JHipster-Maven和纱线执行 [英] JHipster - Maven and Yarn Execution

查看:61
本文介绍了JHipster-Maven和纱线执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据JHipster文档,默认情况下,我应该能够在localhost:8080访问该应用程序,但是页面空白.我安装了yarn 0.27.5并发出命令yarn start启动UI.现在,我可以在localhost:9000上访问该应用程序.为了使该应用程序可用,我必须同时运行mvnw和yarn命令,但这应该只是maven命令.有人可以解释一下原因,以及如何从Eclipse中做到这一点.

As per the JHipster documentation, I am supposed to be able to access the application by default at localhost:8080 but the page comes out to be blank. I installed yarn 0.27.5 and issues the command yarn start to start the UI. Now I am able to access the application at localhost:9000. I have to run the mvnw and yarn commands at the same time for the application to be available for use, but it should be just the maven command. Can someone please explain the reason and how do I do this from Eclipse.

推荐答案

您必须在dev中同时运行yarn和maven,因为yarn会在热重新加载更改时构建角度应用程序,而maven会在构建Spring Boot应用程序时进行维护(包括使用注释处理器生成一些代码)和spring devtools负责热重新加载Java代码更改.

You must run both yarn and maven in dev because yarn takes care of building your angular app while hot reloading your changes, maven takes care of building your spring boot app (including generating some code using annotation processors) and spring devtools takes care of hot reloading your java code changes.

我不使用Eclipse,但我想运行yarn只是从集成终端启动的问题.无论如何,这都不是问题,因为多亏了热重装,您只需要做一次.有关Eclipse的更多信息,请参见: http://www.jhipster.tech/configuring-ide-eclipse/

I don't use Eclipse but I suppose that running yarn is just a matter of launching from the integrated terminal. Anyway this is not a problem because you have to do it only once thanks to hot reloading. More information about Eclipse here: http://www.jhipster.tech/configuring-ide-eclipse/

这篇关于JHipster-Maven和纱线执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆