Spring Cloud CLI 2.2.1

Spring Boot CLI provides Spring Boot command line features for Spring Cloud. You can write Groovy scripts to run Spring Cloud component applications (e.g. @EnableEurekaServer). You can also easily do things like encryption and decryption to support Spring Cloud Config clients with secret configuration values. With the Launcher CLI you can launch services like Eureka, Zipkin, Config Server conveniently all at once from the command line (very useful at development time).
Running Spring Cloud Services in Development

The Launcher CLI can be used to run common services like Eureka, Config Server etc. from the command line. To list the available services you can do spring cloud --list, and to launch a default set of services just spring cloud. To choose the services to deploy, just list them on the command line, e.g.

$ spring cloud eureka configserver h2 kafka stubrunner zipkin

Writing Groovy Scripts and Running Applications

Spring Cloud CLI has support for most of the Spring Cloud declarative features, such as the @Enable* class of annotations. For example, here is a fully functional Eureka server
app.groovy

@EnableEurekaServer
class Eureka {}

which you can run from the command line like this

$ spring run app.groovy

Spring Boot Config

To install, make sure you have Spring Boot CLI (2.0.0 or better):

$ spring version
Spring CLI v2.2.0.BUILD-SNAPSHOT

E.g. for SDKMan users

$ sdk install springboot 2.2.0.BUILD-SNAPSHOT
$ sdk use springboot 2.2.0.BUILD-SNAPSHOT

and install the Spring Cloud plugin

$ mvn install
$ spring install org.springframework.cloud:spring-cloud-cli:2.2.0.BUILD-SNAPSHOT

Spring Initializr
Quickstart Your Project
Bootstrap your application with Spring Initializr.

translate:
翻译:

Spring Boot CLI为Spring Cloud提供了Spring Boot命令行功能。您可以编写Groovy脚本来运行Spring云组件应用程序(例如@EnableEurekaServer)。您还可以轻松地执行加密和解密等操作,以支持具有机密配置值的Spring Cloud配置客户端。使用Launcher CLI,您可以从命令行一次方便地启动Eureka、Zipkin、Config Server等服务(在开发时非常有用)。

在开发中运行Spring云服务

Launcher CLI可用于从命令行运行诸如Eureka、Config Server等公共服务。要列出可用的服务,您可以执行spring cloud–list,并仅启动spring cloud的默认服务集。要选择要部署的服务,只需在命令行中列出它们,例如。

$spring云eureka配置服务器h2 kafka stubrunner zipkin

编写Groovy脚本并运行应用程序

Spring Cloud CLI支持大多数Spring Cloud声明性特性,比如@Enable*类注释。例如,这里有一个功能齐全的Eureka服务器

app.groovy应用程序

@启用EurekaServer

尤里卡类{}

可以从命令行运行

$spring运行app.groovy

弹簧靴配置

要安装,请确保具有Spring Boot CLI(2.0.0或更高版本):

$spring版本

Spring CLI v2.2.0.BUILD-SNAPSHOT版本

E、 g.对于SDKMan用户

$sdk安装springboot 2.2.0.BUILD-SNAPSHOT

$sdk使用springboot 2.2.0.BUILD-SNAPSHOT

安装SpringCloud插件

$mvn安装

$spring安装org.springframework.cloud:springcloud cli:2.2.0.BUILD-SNAPSHOT

弹簧初始化器

快速启动项目

使用Spring初始化器引导应用程序。

发布了0 篇原创文章 · 获赞 152 · 访问量 7077

猜你喜欢

转载自blog.csdn.net/blog_programb/article/details/105242761