• 首页

  • 笑一笑

  • 相册

  • 文学

  • 日志

  • 关于页面
u f a n y
u f a n y

英杰

获取中...

08
13

spring boot和spring cloud 开发必备工具准备 和 必备网站导航

发表于 2020-08-13 • 被 1,834 人看爆

spring boot和spring cloud 开发必备工具准备 和 必备网站导航

本文主要介绍spring cloud开发前期准备,为以后学习和开发有一些资料保障:
常用网站:

  1. spring boot 官网英文网站,有一些简单和详细的介绍 http://projects.spring.io/spring-boot/

  2. spring cloud 官方英文网站 http://projects.spring.io/spring-cloud/

  3. spring cloud 中国社区 http://bbs.springcloud.cn/

  4. spring cloud 中文网 有翻译不全中文文档 https://springcloud.cc/

  5. spring boot maven gradle 配置 一键生产并下载 http://start.spring.io/

  6. Netflix网飞公司github 包含 eureka和zuul 等相关工程,
    并且有相关文档和各类问题解决 https://github.com/Netflix/eureka

  7. 51CTO有目前最新的spring cloud微服务实战课程的主要就是讲springcloud基本组件讲解。

  8. 2017年5月份刚出的一本spring cloud的书可以某东 某宝有卖。

  9. spring cloud 英文文档 http://cloud.spring.io/spring-cloud-static/Camden.SR3/

这里写图片描述

spring cloud 是基于spring boot微服务架构设计开发的。主要还是针对spring boot开调整开发工具。

  1. 首先spring cloud项目是依赖JDK1.8,这个需要自行安装即可。

2、然后可以下载新版的eclipse进行安装,本人安装的最新 eclispe neon2 需要jdk8启动,也可以用其他版本,感觉新版的对spring boot支持比较好
http://www.eclipse.org/downloads/eclipse-packages/

3、安装相应项目构建插件maven或者gradle,建议安装较新版本的。

4、在 eclipse 安装相应插件,主要要安装spring suit tool 和 maven 插件, 如果用gradle开发则安装gradle插件,如果有失败安装过程可能需要多安装那么一两次就能成功了。
下面的具体插件截图:

这里写图片描述

这里写图片描述
这里写图片描述

这里写图片描述

这里写图片描述

这里写图片描述

本人使用的是maven工具进行项目构建:
相关的setting.xml如下:建议使用第三方maven库,比如阿里的库速度就挺快的,不然拉去jar包和一些xml约束在没有网络代理将是一个纠结过程。

<?xml version="1.0" encoding="UTF-8"?>

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<localRepository>D:/maven-repository</localRepository>

<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>

<proxies>

</proxies>

<servers>

<span class="hljs-tag">&lt;<span class="hljs-title">server</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">id</span>&gt;</span>releases<span class="hljs-tag">&lt;/<span class="hljs-title">id</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>ali<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">password</span>&gt;</span>ali<span class="hljs-tag">&lt;/<span class="hljs-title">password</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-title">server</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-title">server</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">id</span>&gt;</span>Snapshots<span class="hljs-tag">&lt;/<span class="hljs-title">id</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>ali<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">password</span>&gt;</span>ali<span class="hljs-tag">&lt;/<span class="hljs-title">password</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-title">server</span>&gt;</span>

</servers>

<mirrors>

<span class="hljs-tag">&lt;<span class="hljs-title">mirror</span>&gt;</span>
  <span class="hljs-comment">&lt;!--This sends everything else to /public --&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-title">id</span>&gt;</span>nexus<span class="hljs-tag">&lt;/<span class="hljs-title">id</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-title">mirrorOf</span>&gt;</span>*<span class="hljs-tag">&lt;/<span class="hljs-title">mirrorOf</span>&gt;</span> 
  <span class="hljs-tag">&lt;<span class="hljs-title">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/groups/public/<span class="hljs-tag">&lt;/<span class="hljs-title">url</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">mirror</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">mirror</span>&gt;</span>
  <span class="hljs-comment">&lt;!--This is used to direct the public snapshots repo in the profile below over to a different nexus group --&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-title">id</span>&gt;</span>nexus-public-snapshots<span class="hljs-tag">&lt;/<span class="hljs-title">id</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-title">mirrorOf</span>&gt;</span>public-snapshots<span class="hljs-tag">&lt;/<span class="hljs-title">mirrorOf</span>&gt;</span> 
  <span class="hljs-tag">&lt;<span class="hljs-title">url</span>&gt;</span>http://maven.aliyun.com/nexus/content/repositories/snapshots/<span class="hljs-tag">&lt;/<span class="hljs-title">url</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">mirror</span>&gt;</span>

</mirrors>

<profiles>
<profile>
<id>development</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<!--this profile will allow snapshots to be searched when activated-->
<id>public-snapshots</id>
<repositories>
<repository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public-snapshots</id>
<url>http://public-snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled><updatePolicy>always</updatePolicy></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>development</activeProfile>
<activeProfile>public-snapshots</activeProfile>
</activeProfiles>
</settings>

由于选择新版本的eclipse是自带maven插件和marketPlace很方便。选择新版本原因主要也是用来进行spring cloud 项目开发。

上述工作做好后,就可以看到导入外部maven工程后可以让项目在run as 有spring boot App启动不必去到切换main主类中进行启动。而且添加的spring boot支持可以使用application.yml作为主要配置文件取代application.properties 使用配置具体结构化的提示,填写非常简单。

对于spring boot项目的依赖可以查看pom文件中的选项,避免一些导入一些不必要的jar包,或者有冲突的jar包。
如下图:
这里写图片描述

分享到:
JavaEE 实战开发之 Spring Cloud 深入剖析课程
尚硅谷2020最新版周阳SpringCloud(H版&alibaba)框架开发教程 学习笔记
  • 文章目录
  • 站点概览
英杰

帅哥英杰

QQ Email RSS
看爆 Top5
  • 使用 MHA 实现 MySQL 主从复制高可用 3,216次看爆
  • nginx反向代理配置去除前缀 2,961次看爆
  • 国产微服务网关-Soul(真香) 2,884次看爆
  • Kubernetes - Xshell连接虚拟机 & 搭建Kubernetes基础集群 2,663次看爆
  • 不把一切看得太重,生命才会更加洒脱 2,628次看爆

Copyright © 2025 英杰 · 冀ICP备19001756号-1

Proudly published with Halo · Theme by fyang · 站点地图