JHipster-构建生产就绪的Angular和Spring Boot应用程序的最快方法

最近几年,我主要从事Web和移动应用程序的前端部分的工作,但我也做了一些次要的后端工作。 从今年中开始,我一直在努力提高后端知识,并开始专注于使用Spring Boot开发Java后端。

As I watched multiple Java tutorials on Pluralsight I stumbled upon JHipster and felt immediately in love with it.

在本文中,我将告诉您为什么我喜欢JHipster,以及如何快速启动JHipster项目。

What Is JHipster?

JHipster是一个开发平台,用于生成,开发和部署Spring Boot + Angular / React / Vue Web应用程序和Spring微服务。

Basically, it is a Yeoman generator which creates applications that include Spring Boot, Bootstrap and Angular (or React or Vue).

Julien Dubois started the project in 2013 and is available on GitHub.

If you like to see JHipster in action, I can recommend the following screencast from Matt Raible:

Why Should I Use JHipster?

在我看来,JHipster令人赞叹

  • 是开源的支持前端的React,Vue,Angular对每个前端框架使用TypeScript使用Spring Boot 2.1,因此我们可以使用Java 11+开发应用程序提供开箱即用的用户管理,包括电子邮件验证和密码重置可以轻松部署到CloudFoundry,Heroku,OpenShift或AWS使用Netflix OSS,Elastic Stack和Docker提供强大的微服务架构使用功能强大的工具Yeoman,Webpack和Maven / Gradle对前端和后端的实体都有良好的测试覆盖率

Quick Start

Install Prerequisites

Make sure to install Java, Git and Node.js which are prerequisites for JHipster.

然后我们可以将JHipster安装为全局npm软件包:npm install -g generator-jhipster

Create New Project

现在我们可以创建一个新项目并开始:

第一步是创建一个新目录并进入mkdir jhipster-demo && cd jhipster-demo

现在我们可以运行吉普斯特这将启动发电机

JHipster Generator

有以下选择:

JHipster Generator Selection

我选择了单片应用程序,因为微服务架构对于一个简单的演示项目来说是过大的选择。 除此之外,我选择Angular作为具有i18n支持并为数据库,缓存和监视进行一些后端配置的前端框架。

Next step is to model our entities with JDL Studio and download the resulting jhipster-jdl.jh file:

JDL Studio

ĴDL Studio is a nice graphical tool for drawing JHipster JDL diagrams based on the ĴDL syntax. You not need to use this graphical tool but can also create entities using the command-line interface.

下载后.jh文件,我们现在可以使用jhipster import-jdl jhipster-jdl.jh。 在我们的示例中,我们仅导入默认的JDL Studio文件,该文件也在上图中显示。

Start Backend

跑./mvnw这将启动Spring Boot应用程序:

JHipster Backend Running

Start Frontend

跑npm开始启动Angular应用程序,然后可以在http://本地主机:9000 /:

JHipster Frontend Running

最后,我们可以登录并查看一些现成的功能,例如查看和编辑实体的可能性,

JHipster Entities

查看应用程序的指标

JHipster Metrics

和用户管理

JHipster User Management

Conclusion

In this article, I just showed you a quick start project and mentioned some of the advantages of it. JHipster is much more powerful as you can see in the official documentation. In my opinion, it is also a good sign if large companies are using the framework, as you can see in this official list.

JHipster的一个缺点是您没有典型的Angular CLI项目。 Angular CLI包含在JHipster中,但是项目结构看起来与默认的Angular CLI项目之一不同。

此外,JHipster生成了很多代码,其中包括许多您可能不了解的库。 您可以在不学习这些库背后基础知识的情况下添加或修改代码,但这可能会导致将来出现一些问题。

您还应该记住,JHipster项目比小而精益的项目更重要。

from: https://dev.to//mokkapps/jhipster-the-fastest-way-to-build-a-production-ready-angular-spring-boot-application-21n8

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值