注: 如果遇到 非法字符: ‘\ufeff’ 字符集编码错误,右击报错子项目,移除BOM即可
编码五部曲:
好的环境配置比代码更重要
入门--------------------------------------------------------------------------
入门篇链接:https://blog.csdn.net/qiwunongqingyin/article/details/117927188
初级--------------------------------------------------------------------------
初级篇链接:https://blog.csdn.net/qiwunongqingyin/article/details/118028552
中级--------------------------------------------------------------------------
中级篇链接:https://blog.csdn.net/qiwunongqingyin/article/details/118151377
alibaba--------------------------------------------------------------------------
高级篇链接:https://blog.csdn.net/qiwunongqingyin/article/details/118411828
微服务架构是一种架构模式,它提倡将单一应用程序划分成一组小的服务,服务之间互相协调、互相配合,为用户提供最终价值。每个微服务运行在其独立的进程中,服务与服务间采用轻量级的通信机制互相协作
(通常是基于HTTP协议的RESTful API)。每个服务都围绕着具体业务进行构建,并且能够被独立的部署到生产环境、类生产环境等。另外,应当尽量避免统一的、集中式的服务管理机制,对具体的一个服务而善应根据业务上下文,选择合适的语言、工具对其进行构建
主题词 : 95后互联网时代下的数字化生活
主题词:基于分布式的微服务架构
1: 是什么?
SpringCloud=分布式微服务架构的一站式解决方案,是多种微服务架构落地技术的集合体,俗称微服务全家桶
2: 符合微服务技术维度
大概有21个主要方向
SpringCloud俨然已成为微服务开发的主流技术栈,
在国内开发者社区非常火爆。
“微”力十足,互联网大厂微服务架构案例
SpringCloud 官网有 SpringBoot 对应版本的显示:
技术选型:https://start.spring.io/actuator/info
{"git":{"branch":"8f9593fef1253b910c77b21f879dc09ac12c0b5d","commit":{"id":"8f9593f","time":"2021-06-16T12:09:03Z"}},"build":{"version":"0.0.1-SNAPSHOT","artifact":"start-site","versions":{"spring-boot":"2.5.1","initializr":"0.11.0-SNAPSHOT"},"name":"start.spring.io website","time":"2021-06-16T12:10:50.844Z","group":"io.spring.start"},"bom-ranges":{"azure":{"2.2.4":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","3.2.0":"Spring Boot >=2.3.0.M1 and <2.4.0-M1","3.5.0":"Spring Boot >=2.4.0.M1 and <2.5.0-M1"},"codecentric-spring-boot-admin":{"2.2.4":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","2.3.1":"Spring Boot >=2.3.0.M1 and <2.5.0-M1"},"solace-spring-boot":{"1.0.0":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","1.1.0":"Spring Boot >=2.3.0.M1 and <2.5.0-M1"},"solace-spring-cloud":{"1.0.0":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","1.1.1":"Spring Boot >=2.3.0.M1 and <2.4.0-M1","2.0.0":"Spring Boot >=2.4.0.M1 and <2.5.0-M1"},"spring-cloud":{"Hoxton.SR11":"Spring Boot >=2.2.0.RELEASE and <2.3.999.BUILD-SNAPSHOT","Hoxton.BUILD-SNAPSHOT":"Spring Boot >=2.3.999.BUILD-SNAPSHOT and <2.4.0.M1","2020.0.0-M3":"Spring Boot >=2.4.0.M1 and <=2.4.0.M1","2020.0.0-M4":"Spring Boot >=2.4.0.M2 and <=2.4.0-M3","2020.0.0":"Spring Boot >=2.4.0.M4 and <=2.4.0","2020.0.3":"Spring Boot >=2.4.1 and <2.5.2-SNAPSHOT","2020.0.4-SNAPSHOT":"Spring Boot >=2.5.2-SNAPSHOT"},"spring-cloud-alibaba":{"2.2.1.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1"},"spring-cloud-gcp":{"2.0.3":"Spring Boot >=2.4.0-M1 and <2.5.0-M1"},"spring-cloud-services":{"2.2.6.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.RELEASE","2.3.0.RELEASE":"Spring Boot >=2.3.0.RELEASE and <2.4.0-M1","2.4.1":"Spring Boot >=2.4.0-M1 and <2.5.0-M1"},"spring-geode":{"1.2.12.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","1.3.12.RELEASE":"Spring Boot >=2.3.0.M1 and <2.4.0-M1","1.4.7":"Spring Boot >=2.4.0-M1 and <2.5.0-M1","1.5.1":"Spring Boot >=2.5.0-M1"},"vaadin":{"14.6.3":"Spring Boot >=2.1.0.RELEASE and <2.6.0-M1"},"wavefront":{"2.0.2":"Spring Boot >=2.1.0.RELEASE and <2.4.0-M1","2.1.1":"Spring Boot >=2.4.0-M1 and <2.5.0-M1","2.2.0":"Spring Boot >=2.5.0-M1"}},"dependency-ranges":{"native":{"0.9.0":"Spring Boot >=2.4.3 and <2.4.4","0.9.1":"Spring Boot >=2.4.4 and <2.4.5","0.9.2":"Spring Boot >=2.4.5 and <2.5.0-M1","0.10.0":"Spring Boot >=2.5.0-M1 and <2.5.2-M1","0.10.1-SNAPSHOT":"Spring Boot >=2.5.2-M1 and <2.6.0-M1"},"okta":{"1.4.0":"Spring Boot >=2.2.0.RELEASE and <2.4.0-M1","1.5.1":"Spring Boot >=2.4.0-M1 and <2.4.1","2.0.1":"Spring Boot >=2.4.1 and <2.5.0-M1"},"mybatis":{"2.1.4":"Spring Boot >=2.1.0.RELEASE and <2.5.0-M1","2.2.0":"Spring Boot >=2.5.0-M1"},"camel":{"3.3.0":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","3.5.0":"Spring Boot >=2.3.0.M1 and <2.4.0-M1","3.10.0":"Spring Boot >=2.4.0.M1 and <2.5.0-M1"},"open-service-broker":{"3.1.1.RELEASE":"Spring Boot >=2.2.0.RELEASE and <2.3.0.M1","3.2.0":"Spring Boot >=2.3.0.M1 and <2.4.0-M1","3.3.0":"Spring Boot >=2.4.0-M1 and <2.5.0-M1"}}}
是个json串…不过找个工具转换一下,就好了比如:https://www.matools.com/json或者https://tool.lu/json/
技术 | 版本 |
---|---|
cloud | Hoxton.SR1 |
boot | 2.3.10.RELEASE |
cloud alibaba | 2.1.1.RELEASE |
Java | java8 |
Maven | 3.5及以上 |
Mysql | 5.7及以上 |
问: 为什么boot使用2.3.10那?
答: 如果只使用boot想用哪个用哪个…可是使用cloud就要为cloud让路,每个版本都有官网推荐(Reference Doc):
Release Train Version: Hoxton.SR11
Supported Boot Version: 2.3.10.RELEASE
技术 | 不推荐 | 推荐 |
---|---|---|
服务注册中心 | Eureka 不推荐(进ICU了) | 可以用Zookeeper替换,或者用alibaba的nacos |
服务调用 | Nacos(百万级注册) | Ribbon (轻度患者) |
服务调用2 | Feign | (ICU),OpenFeign推荐 |
服务降级 | Hystrix (ICU)官网不用了,国内在用 | 国外推荐用:resilience4j, alibaba推荐用sentienl, |
服务网关 | Zuul (ICU),Zuul2(没生出来…) | spring出的gateway(主流,推荐) |
服务配置 | Config | Nacos |
服务总线 | Bus | Nacos |
网络活雷锋:https://www.bookstack.cn/read/spring-cloud-docs/docs-index.md
创建 Maven 工程 :
项目sdk(1.8) -> 从原型创建(maven-archetype-site) -> 包名,项目名 ->
Maven主路径(3.5以上) -> OK
项目编码:
File Encodings -> 全局UTF-8
(Ctrl+Alt+S)可能会被qq等应用占用快捷键
注解激活
Settings -> Build,Execution,Deployment -> Complier -> Annotation Processors -> Default -> √ Enable annotation processing 打√
java编译器
Settings -> Build,Execution,Deployment -> Complier -> Java Compiler -> Target bytecode version 1.5 ->8
目标字节码版本改为8
文件过滤
可有可无,文件中有一些根本用不到的文件,可让他不显示!!!
Settings -> Editor -> File Types -> 需要过滤的文件 -> 添加 -> *.idea 和 *.iml
其中cloud,boot,alibaba是此篇文章的项目架构,就不要变了,其他的根据自己本地修改, ${}中的内容,就别改了,在<,properties>中集体定义了
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0modelVersion>
<groupId>com.xyygroupId>
<artifactId>cloudartifactId>
<version>1.0-SNAPSHOTversion>
<packaging>pompackaging>
<properties>
<project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
<maven.compiler.source>1.8maven.compiler.source>
<maven.compiler.target>1.8maven.compiler.target>
<junit.version>4.12junit.version>
<log4j.version>1.2.17log4j.version>
<lombok.version>1.16.18lombok.version>
<mysql.version>8.0.23mysql.version>
<druid.verison>1.1.16druid.verison>
<mybatis.spring.boot.verison>1.3.0mybatis.spring.boot.verison>
properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-dependenciesartifactId>
<version>2.3.10.RELEASEversion>
<type>pomtype>
<scope>importscope>
dependency>
<dependency>
<groupId>org.springframework.cloudgroupId>
<artifactId>spring-cloud-dependenciesartifactId>
<version>Hoxton.SR1version>
<type>pomtype>
<scope>importscope>
dependency>
<dependency>
<groupId>com.alibaba.cloudgroupId>
<artifactId>spring-cloud-alibaba-dependenciesartifactId>
<version>2.2.0.RELEASEversion>
<type>pomtype>
<scope>importscope>
dependency>
<dependency>
<groupId>mysqlgroupId>
<artifactId>mysql-connector-javaartifactId>
<version>${mysql.version}version>
dependency>
<dependency>
<groupId>com.alibabagroupId>
<artifactId>druid-spring-boot-starterartifactId>
<version>${druid.verison}version>
dependency>
<dependency>
<groupId>org.mybatis.spring.bootgroupId>
<artifactId>mybatis-spring-boot-starterartifactId>
<version>${mybatis.spring.boot.verison}version>
dependency>
<dependency>
<groupId>org.projectlombokgroupId>
<artifactId>lombokartifactId>
<version>${lombok.version}version>
dependency>
<dependency>
<groupId>junitgroupId>
<artifactId>junitartifactId>
<version>${junit.version}version>
dependency>
<dependency>
<groupId>log4jgroupId>
<artifactId>log4jartifactId>
<version>${log4j.version}version>
dependency>
dependencies>
dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-maven-pluginartifactId>
<configuration>
<fork>truefork>
<addResources>trueaddResources>
configuration>
plugin>
plugins>
build>
project>
Maven 使用dependencyManagement元素来提供了一种管理依赖版本号的方式。
通常会在一个组织或者项目的最顶层的父POM中看到dependencyManagement元素
使用pom.xml 中的dependencyManagement元素能让所有在子项目中引用一个依赖而不用显式的列出版本号。
Maven 会沿着父子层次向上走,直到找到一个拥有dependencyManagement元素的项目,然后它就会使用这个dependencyManagement元素中指定的版本号。
类似java的继承,没有用爹的,自己定义了用自己的
点击右侧边栏的maven,上面有个闪电图标,跳过测试模式,点一下
父工程创建完成执行mvn:install将父工程发布到仓库方便子工程继承(可以先清空 clean,后发布 install)
微服务步骤!!!:
构建 cloud-provider-payment8001 子项目
微服务提供者支付Module模块
右键项目 -> 新建 -> 新模块 -> maven -> jdk1.8 -> 名称:cloud-provider-payment8001
改pom
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cloudartifactId>
<groupId>com.xyygroupId>
<version>1.0-SNAPSHOTversion>
parent>
<modelVersion>4.0.0modelVersion>
<artifactId>cloud-provider-payment8001artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-webartifactId>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-actuatorartifactId>
dependency>
<dependency>
<groupId>org.mybatis.spring.bootgroupId>
<artifactId>mybatis-spring-boot-starterartifactId>
dependency>
<dependency>
<groupId>com.alibabagroupId>
<artifactId>druid-spring-boot-starterartifactId>
<version>1.1.10version>
dependency>
<dependency>
<groupId>mysqlgroupId>
<artifactId>mysql-connector-javaartifactId>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-jdbcartifactId>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-devtoolsartifactId>
<scope>runtimescope>
<optional>trueoptional>
dependency>
<dependency>
<groupId>org.projectlombokgroupId>
<artifactId>lombokartifactId>
<optional>trueoptional>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-testartifactId>
<scope>testscope>
dependency>
dependencies>
project>
改yml
resources 下创建 application.yml
server:
port: 8001
spring:
application:
name: cloud-payment-service
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/db2019?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
username: root
password: root
type: com.alibaba.druid.pool.DruidDataSource
mybatis:
# 实体类 可能不起作用,xml里建议写全路径
type-aliases-package: com.xyy.springcloud.entity
# 映射文件路径
mapper-locations: classpath:mapper/*.xml
#configuration:
# 自动映射级别
#auto-mapping-behavior: full
# log日志
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
写启动类
src下右击新建类:
com.xyy.springcloud.PaymentMain8001
package com.xyy.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author xyy
* @date 2021年06月17日 11:56
*/
@SpringBootApplication
public class PaymentMain8001 {
public static void main(String[] args) {
SpringApplication.run(PaymentMain8001.class,args);
}
}
业务类
建表:
CREATE TABLE `payment`(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`serial` varchar(200) DEFAULT '',
PRIMARY KEY (id)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4
创建实体类,service等:
可以查看我以前写的mybatis-plus逆向生成:https://blog.csdn.net/qiwunongqingyin/article/details/116152582
JSON封装体:
也可以查看我之前写的: https://blog.csdn.net/qiwunongqingyin/article/details/115965875
编写mapper.java 和 mapper.xml:
mapper.java:
@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {
int create(Payment payment);
Payment getPaymentById(@Param("id") Long id);
}
mapper.xml
DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xyy.springcloud.mapper.PaymentMapper">
<insert id="create" parameterType="com.xyy.springcloud.entity.Payment" useGeneratedKeys="true" keyProperty="id">
insert into payment(serial) values (#{serial});
insert>
<resultMap id="BaseResultMap" type="com.xyy.springcloud.entity.Payment">
<id column="id" property="id" jdbcType="BIGINT">id>
<result column="serial" property="serial" jdbcType="VARCHAR">result>
resultMap>
<select id="getPaymentById" parameterType="Long" resultMap="BaseResultMap">
select * from payment where id=#{id}
select>
mapper>
编写service和serviceImpl:
service.java:
public interface IPaymentService extends IService<Payment> {
int create(Payment payment);
Payment getPaymentById(@Param("id") Long id);
}
serviceImpl.java:
@Service
public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, Payment> implements IPaymentService {
@Override
public int create(Payment payment) {
return super.getBaseMapper().create(payment);
}
@Override
public Payment getPaymentById(Long id) {
return super.getBaseMapper().getPaymentById(id);
}
}
编写controller.java:
@RestController
@Slf4j
@RequestMapping("/payment")
public class PaymentController {
@Resource
private IPaymentService iPaymentService;
@PostMapping("create")
public Output create(Payment payment){
int result = iPaymentService.create(payment);
log.info("****插入结果:"+result);
if(result>0) {
return Output.success("插入成功", result);
}
return Output.failure(444,"插入失败");
}
@PostMapping("get/{id}")
public Output getPaymentById(@PathVariable("id")Long id){
Payment paymentById = iPaymentService.getPaymentById(id);
log.info("****查询结果:"+paymentById);
if(paymentById!=null) {
return Output.success("查询成功", paymentById);
}
return Output.failure(444,"查询失败--"+id);
}
}
启动运行
使用apipost工具:
create: data:1 这个1 是该数据的id,不是成功插入了一条的意思
get:
控制台一直报错
java.net.ConnectException: Connection refused: connect(这个不用管)
还有就是可能爆依赖注入失败…最后是loggerFoctor啥的,排除一下是否写错xml,yml内容,如果没有问题,使用的是springboot内置tomcat的话,看一下控制台最上面有没有警告…大概意思是tomcat内存泄漏什么的…就是这比玩意儿…贼坑…我第一天关机…第二天启动电脑就好了…
在子(8001)的pom.xml中添加
如果按照上面的4.2.1整个跟下来的话,pom文件中应该已经有了
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-devtoolsartifactId>
<scope>runtimescope>
<optional>trueoptional>
dependency>
添加 plugin 到你的 pom.xml 父工程中
4.1.1 中也已经添加好
<build>
<finalName>你自己工程名字..写不写都行finalName>
<plugins>
<plugin>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-maven-pluginartifactId>
<configuration>
<fork>truefork>
<addResources>trueaddResources>
configuration>
plugin>
plugins>
build>
ctrl + shift + alt + /
四个键compiler.automake.allow.when.app.running
选项打钩actionSystem.assertFocusAccessFromEdt
选项打钩创建cloud-consumer-order80
子项目
修改pom.xml
:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cloudartifactId>
<groupId>com.xyygroupId>
<version>1.0-SNAPSHOTversion>
parent>
<modelVersion>4.0.0modelVersion>
<artifactId>cloud-consumer-order80artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-webartifactId>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-actuatorartifactId>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-devtoolsartifactId>
<scope>runtimescope>
<optional>trueoptional>
dependency>
<dependency>
<groupId>org.projectlombokgroupId>
<artifactId>lombokartifactId>
<optional>trueoptional>
dependency>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-starter-testartifactId>
<scope>testscope>
dependency>
<dependency>
<groupId>com.baomidougroupId>
<artifactId>mybatis-plus-boot-starterartifactId>
<version>3.2.0version>
dependency>
dependencies>
project>
编写application.yml: 浏览器默认端口是80
,所以只写网址或者ip就不用写端口了,比如www.baidu.com
不会写成www.baidu.com:80
server:
port:80
创建OrderController.java
RestTemplate 在4.5.1中有介绍
import com.xyy.springcloud.entity.Output;
import com.xyy.springcloud.entity.Payment;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
@RestController
@Slf4j
@RequestMapping("/order/consumer")
public class OrderController {
public static final String PAYMENT_URL = "http://localhost:8001";
@Resource
private RestTemplate restTemplate;
@GetMapping("create")
public Output<Payment> create(Payment payment) {
return restTemplate.postForObject(PAYMENT_URL + "/payment/create", payment, Output.class);
}
@GetMapping("get/{id}")
public Output<Payment> getPayment(@PathVariable("id") Long id) {
System.out.println("--------------------");
return restTemplate.getForObject(PAYMENT_URL + "/payment/get/" + id, Output.class);
}
}
编写 ApplicationContextConfig
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@Configuration
public class ApplicationContextConfig {
@Bean
public RestTemplate getRestTemplate() {
return new RestTemplate();
}
}
测试
http://localhost/order/consumer/create?serial=zxcvsdaf
http://localhost/order/consumer/get/1
create 方法会发现插入成功,但是值不在…需要在调用的目标方法(8001 create)上参数前@RequestBody
注解
出现的bug:
是什么?
RestTemplate提供了多种便捷访问远程Http服务的方法
是一种简单便捷的访问restful服务模板类,是Spring提供的用于访问Rest服务的客户端模板工具集
官网及使用!
官网: https://docs.spring.io/spring-framework/docs/5.2.0.RELEASE/javadoc-api//org/springframework/web/client/RestTemplate.html
使用: 使用restTemplate访问restful接口非常的简单粗暴无脑。
(url, requestMap, ResponseBean.class)这三个参数分别代表REST请求地址、请求参数、HTTP响应转换被转换成的对象类型,如 :restTemplate.postForObject(url,params, returnClass);
由于80服务和8001服务中都有entity包,并且其中的实体类相同内容一样,所以我们将其提出来,一处编写处处通用.
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>cloudartifactId>
<groupId>com.xyygroupId>
<version>1.0-SNAPSHOTversion>
parent>
<modelVersion>4.0.0modelVersion>
<artifactId>cloud-api-commonsartifactId>
<dependencies>
<dependency>
<groupId>org.springframework.bootgroupId>
<artifactId>spring-boot-devtoolsartifactId>
<scope>runtimescope>
<optional>trueoptional>
dependency>
<dependency>
<groupId>org.projectlombokgroupId>
<artifactId>lombokartifactId>
<optional>trueoptional>
dependency>
<dependency>
<groupId>cn.hutoolgroupId>
<artifactId>hutool-allartifactId>
<version>5.1.0version>
dependency>
dependencies>
project>
maven -> cloud-api-commons -> 生命周期 -> clean -> install
<dependency>
<groupId>com.xyygroupId>
<artifactId>cloud-api-commonsartifactId>
<version>${project.version}version>
dependency>
至此入门结束… 现在这些东西已经可以写微服务架构了…但是…还不够 ! ! ! ! ! !
接下来将会将 3.2 cloud升级
中的 所有内容一点点的加进来…