JHipster - Maven and Yarn Execution

瘦欲@ 提交于 2019-12-24 19:45:37

问题


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.


回答1:


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.

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/



来源:https://stackoverflow.com/questions/47293111/jhipster-maven-and-yarn-execution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!