确定稳定的 Spring Cloud 相关环境版本

转载 2018年04月16日 23:39:23

开发部署 Spring Cloud 微服务框架,需要先确定 Spring Cloud 的相关环境版本,主要包含:Spring Cloud、Spring Cloud Netflix、JDK、JRE、Java Version等相关版本,以及环境的配置。

现在最新版本 Java 10、Spring Boot 2.0、Spring Cloud Finchley.M9,但这些版本还不太稳定,而且相关的兼容也不是很好,问题的解决方案也比较少。

今天花了大概一天的时间,尝试了各种版本的兼容,以及使用部署的问题,最终确定了下面这套版本,比较相对稳定。

如果使用其他版本的话,会出现一些问题,比如下面:

服务器配置 JRE 环境

使用 wget 命令,在官网下载对应的 Server JRE。

创建安装目录:

$ sudo mkdir -p /usr/local/java

解压文件到指定目录:

$ sudo tar -zxvf serverjre-9.0.1_linux-x64_bin.tar.gz -C /usr/local/java/ --strip-components=1

编辑配置文件:

$ sudo vi /etc/profile

将下面配置添加到配置文件中:

# JRE configuration

export JAVA_HOME=/usr/local/java
export JRE_HOME=${JAVA_HOME}
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

# End JDK configuration

生效及测试:

$ source /etc/profile
$ java -version

Mac 配置 JDK 环境

官网下载对应的 Mac JDK 版本。

直接安装成功后(目录:/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk)。

编辑配置文件:

$ sudo vi /etc/profile

将下面配置添加到配置文件中:

# JDK configuration

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
export JRE_HOME=${JAVA_HOME}
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH

# End JDK configuration

生效及测试:

$ source /etc/profile
$ java -version

IntelliJ IDEA 选择添加 JDK 即可:

IntelliJ IDEA 修改当前项目的 JDK 版本:

参考资料:https://card.weibo.com/article/v3/editor#/history/186963
https://card.weibo.com/article/v3/editor#/history/186608
https://card.weibo.com/article/v3/editor#/history/186424
https://card.weibo.com/article/v3/editor#/history/185801
https://card.weibo.com/article/v3/editor#/history/185781
https://card.weibo.com/article/v3/editor#/history/185463
https://card.weibo.com/article/v3/editor#/history/174288
https://card.weibo.com/article/v3/editor#/history/174119
https://card.weibo.com/article/v3/editor#/history/173561
https://card.weibo.com/article/v3/editor#/history/173336
https://card.weibo.com/article/v3/editor#/history/173082
https://card.weibo.com/article/v3/editor#/history/184630
https://card.weibo.com/article/v3/editor#/history/183057
https://card.weibo.com/article/v3/editor#/history/184940
https://card.weibo.com/article/v3/editor#/history/186882
https://card.weibo.com/article/v3/editor#/history/186884
https://card.weibo.com/article/v3/editor#/history/186966
https://card.weibo.com/article/v3/editor#/history/187201
https://card.weibo.com/article/v3/editor#/history/187391
https://card.weibo.com/article/v3/editor#/history/174940
https://card.weibo.com/article/v3/editor#/history/187695
https://card.weibo.com/article/v3/editor#/history/185492
https://card.weibo.com/article/v3/editor#/history/187410
https://card.weibo.com/article/v3/editor#/history/174972
https://card.weibo.com/article/v3/editor#/history/187714
https://card.weibo.com/article/v3/editor#/history/185531
https://card.weibo.com/article/v3/editor#/history/188021
https://card.weibo.com/article/v3/editor#/history/175465
https://card.weibo.com/article/v3/editor#/history/187712
https://card.weibo.com/article/v3/editor#/history/188523
https://card.weibo.com/article/v3/editor#/history/188120
https://card.weibo.com/article/v3/editor#/history/176032
https://card.weibo.com/article/v3/editor#/history/176073
https://card.weibo.com/article/v3/editor#/history/176022
https://card.weibo.com/article/v3/editor#/history/188239
https://card.weibo.com/article/v3/editor#/history/188643
https://card.weibo.com/article/v3/editor#/history/186373
https://card.weibo.com/article/v3/editor#/history/188251
https://card.weibo.com/article/v3/editor#/history/188665
https://card.weibo.com/article/v3/editor#/history/186385
https://card.weibo.com/article/v3/editor#/history/186508
https://card.weibo.com/article/v3/editor#/history/188788
https://card.weibo.com/article/v3/editor#/history/188382
https://card.weibo.com/article/v3/editor#/history/186627
https://card.weibo.com/article/v3/editor#/history/176292
https://card.weibo.com/article/v3/editor#/history/176523
https://card.weibo.com/article/v3/editor#/history/188817
https://card.weibo.com/article/v3/editor#/history/188818
https://card.weibo.com/article/v3/editor#/history/189232
https://card.weibo.com/article/v3/editor#/history/189237
https://card.weibo.com/article/v3/editor#/history/186919
https://card.weibo.com/article/v3/editor#/history/186921
https://card.weibo.com/article/v3/editor#/history/176408
https://card.weibo.com/article/v3/editor#/history/188683
https://card.weibo.com/article/v3/editor#/history/189175
https://card.weibo.com/article/v3/editor#/history/186813
https://card.weibo.com/article/v3/editor#/history/176522
https://card.weibo.com/article/v3/editor#/history/176562
https://card.weibo.com/article/v3/editor#/history/188886
https://card.weibo.com/article/v3/editor#/history/189283
https://card.weibo.com/article/v3/editor#/history/186984
https://card.weibo.com/article/v3/editor#/history/188906
https://card.weibo.com/article/v3/editor#/history/176578
https://card.weibo.com/article/v3/editor#/history/189299
https://card.weibo.com/article/v3/editor#/history/189300
https://card.weibo.com/article/v3/editor#/history/187004
https://card.weibo.com/article/v3/editor#/history/187005
https://card.weibo.com/article/v3/editor#/history/176613
https://card.weibo.com/article/v3/editor#/history/176614
https://card.weibo.com/article/v3/editor#/history/176687
https://card.weibo.com/article/v3/editor#/history/176692
https://card.weibo.com/article/v3/editor#/history/189480
https://card.weibo.com/article/v3/editor#/history/189482
https://card.weibo.com/article/v3/editor#/history/189063
https://card.weibo.com/article/v3/editor#/history/189067
https://card.weibo.com/article/v3/editor#/history/176713
https://card.weibo.com/article/v3/editor#/history/187171
https://card.weibo.com/article/v3/editor#/history/189622
https://card.weibo.com/article/v3/editor#/history/189624
https://card.weibo.com/article/v3/editor#/history/187236
https://card.weibo.com/article/v3/editor#/history/187237
https://card.weibo.com/article/v3/editor#/history/176714
https://card.weibo.com/article/v3/editor#/history/176820
https://card.weibo.com/article/v3/editor#/history/188223
https://card.weibo.com/article/v3/editor#/history/188226
https://card.weibo.com/article/v3/editor#/history/189694
https://card.weibo.com/article/v3/editor#/history/190006
https://card.weibo.com/article/v3/editor#/history/177134
https://card.weibo.com/article/v3/editor#/history/177135
https://card.weibo.com/article/v3/editor#/history/189554
https://card.weibo.com/article/v3/editor#/history/189556
https://card.weibo.com/article/v3/editor#/history/189637
https://card.weibo.com/article/v3/editor#/history/188465
https://card.weibo.com/article/v3/editor#/history/190067
https://card.weibo.com/article/v3/editor#/history/177250
https://card.weibo.com/article/v3/editor#/history/188810
https://card.weibo.com/article/v3/editor#/history/190213
https://card.weibo.com/article/v3/editor#/history/177397

Spring Cloud简介以及版本选择

什么是SpringCloud官方的说法就是Spring Cloud 给开发者提供一套按照一定套路快速开发 分布式系统 的工具。 具体点就是Spring boot实现的微服务架构开发工具。它为微服务...
  • csdn2193714269
  • csdn2193714269
  • 2017-06-03 17:00:29
  • 12934

Spring Cloud与Spring Boot版本匹配关系

Spring Cloud是什么? “Spring Cloud provides tools for developers to quickly build some of the com...
  • ljj_9
  • ljj_9
  • 2017-11-27 15:12:18
  • 5491

SpringCloud的版本

Spring Cloud 项目目前仍然是快速迭代期,版本变化很快。这里整理一下版本相关的东西,备忘一下。 大版本 版本号规则 Spring Cloud并没有熟悉的数字版本号,而是对应一个...
  • 54powerman
  • 54powerman
  • 2018-01-25 16:23:41
  • 1554

Spring Cloud与Spring Boot版本匹之间的关系

Spring Cloud版本 Spring Cloud版本演进情况如下: 版本名称 版本号 Finchley snapshot版 Edgware snaps...
  • yyzc2
  • yyzc2
  • 2018-02-09 16:29:53
  • 673

说说Spring Cloud版本的那些事儿。

版本命名 之前提到过,Spring Cloud是一个拥有诸多子项目的大型综合项目,原则上其子项目也都维护着自己的发布版本号。那么每一个Spring Cloud的版本都会包含不同的子项目版本,为了...
  • T123012009065
  • T123012009065
  • 2017-09-21 17:13:18
  • 406

Spring Cloud官方文档Dalston版本翻译(一)

Spring Cloud 文档(一) 基本介绍及Config ServerBy CB版本:Dalston.RELEASEFeatures | 功能Spring Cloud专注于提供一个可以覆盖其他的开...
  • yanzu_coder
  • yanzu_coder
  • 2017-04-26 16:15:39
  • 1802

最新Spring Boot 与Spring Cloud版本对应关系

Spring Boot Spring Cloud 1.2.x Angel版本 1.3.x Brixton版本 1.4.x Camden版本 1.5.x Dalston...
  • stloven5
  • stloven5
  • 2017-10-19 15:36:23
  • 1307

spring cloud踩坑日志(3)-多环境配置文件用法

现实的开发中,需要切换生产、开发、测试环境 一般会频繁更改配置文件 实际开发中可能会 由于配置文件出错导致的项目报错 spring cloud 提供了一个切换配置文件的方法很简单,首先 配置文件...
  • a1178013314
  • a1178013314
  • 2017-10-12 13:50:28
  • 664

Spring Cloud版本查看

https://github.com/spring-cloud/spring-cloud-release/releases
  • ab7253957
  • ab7253957
  • 2017-06-22 10:57:53
  • 801

介绍Spring-Cloud的版本是如何定义的

Spring Cloud是一个由众多独立子项目组成的大型综合项目,每个子项目有不同的发行节奏,都维护着自己的发布版本号。Spring Cloud通过一个资源清单BOM(Bill of Material...
  • peterwanghao
  • peterwanghao
  • 2018-03-20 22:44:39
  • 294
收藏助手
不良信息举报
您举报文章:确定稳定的 Spring Cloud 相关环境版本
举报原因:
原因补充:

(最多只允许输入30个字)