jhipster快速入门指南

时同
2023-12-01

步骤

  1. 安装JHipster npm install -g generator-jhipster
  2. 创建一个新目录并进入该目录 mkdir myApp && cd myApp
  3. 运行Jhipster并按照屏幕指引操作jhipster
  4. 使用 JDL Studio定义您的实体类后, 下载jhipster-jdl.jh文件
  5. 生成实体类代码jhipster import-jdl jhipster-jdl.jh

vuejs

Jhipster初始化项目springboot + vue.js

常见问题

  1. 执行jhipster --blueprint vuejs报错
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: The generator-jhipster-vuejs blueprint provided is not installed. Please install it using command npm i -g generator-jhipster-vuejs.
    at Environment.error (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-environment\lib\environment.js:176:40)
    at module.exports.error (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\generators\generator-base.js:1448:18)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\generators\generator-base-private.js:835:22
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\shelljs\src\exec.js:127:9
    at ChildProcess.exithandler (child_process.js:310:5)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
Emitted 'error' event on Environment instance at:
    at Environment.error (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\yeoman-environment\lib\environment.js:178:15)
    at module.exports.error (C:\Users\Administrator\AppData\Roaming\npm\node_modules\generator-jhipster\generators\generator-base.js:1448:18)
    [... lines matching original stack trace ...]
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)

解决方案:

npm install -g yo

然后根据提示修复环境问题

Tutorial and IDE

jhipster tutorial
jhipster-ide

 类似资料: