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.找到安装路径   在resources\config文件夹下找application-dev.yml文件在datasource:下,修改数据库地址用户密码

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

posted @ 2020-05-14 14:37  一个小bu⑥  阅读(294)  评论(0编辑  收藏  举报