jhipster生成工程

Posted peijystudy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jhipster生成工程相关的知识,希望对你有一定的参考价值。

准备

1.maven管理

2.mysql数据库

3.git

4.node.js

5.yarn

6.npm(npm和yarn装一个就行,推荐npm)

7.配置npm的registry地址,推荐使用淘宝npm镜像

 参考链接:https://www.cnblogs.com/peijyStudy/p/12888085.html

8.脚手架安装:
8.1安装Yeoman
    npm install -g yo
8.2安装Bower
    npm install -g bower
8.3安装Grunt/Gulp
    npm install -g grunt-cli
    npm install -g gulp
8.4最后安装npm install -g generator-jhipster

开始

单独创建前后端工程

后端

jhipster --skip-client

参数设置

? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? What is the base name of your application? api
? What is your default Java package name? com.cnc.demo.arch1.api
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)
? Which *production* database would you like to use? MySQL
? Which *development* database would you like to use? MySQL
? Do you want to use the Spring cache abstraction? Yes, with the Ehcache implementation (local cache, for a single node)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use? 
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application English
? Please choose additional languages to install 
? Besides JUnit and Karma, which testing frameworks would you like to use? 
? Would you like to install other generators from the JHipster Marketplace? No

 前端

jhipster --skip-server --db=sql --auth=jwt

 参数设置

? What is the base name of your application? admin
? Which *Framework* would you like to use for the client? Angular 5
? Would you like to enable *SASS* support using the LibSass stylesheet preprocessor? No
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application English
? Please choose additional languages to install 
? Besides JUnit and Karma, which testing frameworks would you like to use? 
? Would you like to install other generators from the JHipster Marketplace? No

 启动

1.找到安装路径   在resourcesconfig文件夹下找application-dev.yml文件在datasource:下,修改数据库地址用户密码

启动方式
①:cmd方式启动在文件目录下用mvnw或者mvn spring-boot:run
②:eclipse中右键import   maven  -> Existing Maven Projects-> browse(选择生成的文件夹)-> OK
③:npm start

以上是关于jhipster生成工程的主要内容,如果未能解决你的问题,请参考以下文章

Jhipster实践系列 - 生成单体架构的应用程序

如何使用 Jhipster 生成的代码为注销添加审核?

JHipster JDL 没有生成任何东西,因为必须传递数据库类型

Jhipster介绍和使用

更新 JHipster 生成器后如何更新 JHipster 项目?

通过 YARN 添加生成器 jhipster 时出错