赞
踩
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hutool.version>5.8.22</hutool.version>
<lombok.version>1.18.26</lombok.version>
<druid.version>1.1.20</druid.version>
<mybatis.springboot.version>3.0.2</mybatis.springboot.version>
<mybatisPlus.springboot.version>3.5.7</mybatisPlus.springboot.version>
<mysql.version>8.0.11</mysql.version>
<swagger3.version>2.2.0</swagger3.version>
<mapper.version>4.2.3</mapper.version>
<fastjson2.version>2.0.40</fastjson2.version>
<persistence-api.version>1.0.2</persistence-api.version>
<spring.boot.test.version>3.1.5</spring.boot.test.version>
<spring.boot.version>3.3.0</spring.boot.version>
<spring.cloud.version>2023.0.2</spring.cloud.version>
<spring.cloud.alibaba.version>2023.0.1.0</spring.cloud.alibaba.version>
</properties>
<dependencyManagement>
<dependencies>
<!--springboot 版本控制依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--springcloud 版本控制依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--springcloud alibaba 版本控制依赖-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>${spring.cloud.alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- <!–SpringBoot集成mybatis–>-->
<!-- <dependency>-->
<!-- <groupId>org.mybatis.spring.boot</groupId>-->
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<!-- <version>${mybatis.springboot.version}</version>-->
<!-- </dependency>-->
<!--SpringBoot集成mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>${mybatisPlus.springboot.version}</version>
</dependency>
<!--Mysql数据库驱动8 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<!--SpringBoot集成druid连接池-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!--通用Mapper4之tk.mybatis-->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>${mapper.version}</version>
</dependency>
<!--persistence-->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>${persistence-api.version}</version>
</dependency>
<!-- fastjson2 -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>${fastjson2.version}</version>
</dependency>
<!-- swagger3 调用方式 http://你的主机IP地址:5555/swagger-ui/index.html -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>${swagger3.version}</version>
</dependency>
<!--hutool-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
<!-- spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.test.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.lmf.cloud</groupId>
<artifactId>common</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- Springboot3升级之后必须添加的maven编译插件,这样才能解析接口方法参数,默认是不能自动解析接口参数-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<parameters>true</parameters>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<!-- Springboot3升级之后必须添加的maven编译插件,这样才能解析接口方法参数,默认是不能自动解析接口参数-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<parameters>true</parameters>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>
https://gitee.com/lmf-2021/SpringCloud2024/blob/master/SpringCloud%E7%AC%AC3%E5%AD%A32024.html
https://spring-cloud-alibaba-group.github.io/github-pages/2022/zh-cn/
服务注册发现、配置管理中心;本身就是一个单独的微服务;同时也是所有分布式微服务组件的基础应用
<!-- Springcloud-nacos-服务注册中心整合依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- springcloud-nacos-config-配置中心整合依赖-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!--Springcloud-bootstrap容器整合依赖,可以使用bootstrap.yml配置文件-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
https://www.cnblogs.com/crazymakercircle/p/14231815.html
https://developer.aliyun.com/article/1157617
https://blog.csdn.net/m0_56287495/article/details/129240577
远程服务调用框架、客户端负载均衡工具(Nginx是服务端负载均衡工具);需要依赖服务注册与发现;支持与多种http库集成
<!-- Springcloud-loadbalancer-远程服务调用、负载均衡整合依赖,可以单独使用-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
https://www.cnblogs.com/itxiaoshen/p/16247702.html
远程服务调用框架、客户端负载均衡工具(Nginx是服务端负载均衡工具);需要依赖服务注册与发现,内部整合了LoadBalancer负载均衡,可以完全替代LoadBalancer组件
<!--Springcloud-openfeign-远程服务调用、负载均衡整合依赖,底层整合loadbalancer,因此需要该依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- Springcloud-loadbalancer-远程服务调用、负载均衡整合依赖,可以单独使用-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!-- 根据需要是否添加下面依赖,用于替换Openfeign底层的http请求为请求连接池-->
<!-- httpclient5-->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<!-- feign-hc5-整合依赖-->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-hc5</artifactId>
</dependency>
https://blog.csdn.net/weixin_44606481/article/details/132499972
https://docs.spring.io/spring-cloud-openfeign/docs/current/reference/html/appendix.html
微服务端网关路由;本身就是一个单独的微服务;需要依赖服务注册与发现;Gateway服务配置路由之后,再访问Gateway服务,Gateway服务就可以把请求转发到其他具体微服务上面;
<!-- 网关是响应式编程,必须删除掉 spring-boot-starter-web 场景dependency-->
<!-- Springcloud-gateway-网关路由整合依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
</dependency>
<!-- 根据需要添加:解决netty框架与mac系统m1芯片集成dns问题-->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<!-- <version>4.1.75.Final</version> <!–版本号自己切–>-->
<classifier>osx-aarch_64</classifier>
</dependency>
https://developer.aliyun.com/article/1294775#slide-4
https://www.cnblogs.com/crazymakercircle/p/11704077.html#autoid-h2-0-0-0
https://springdoc.cn/spring-cloud-gateway/#setrequestheader
一般情况:将Nginx设置为流量网关,Gateway设置为业务网关,两者作用都是负载均衡作用,Gateway网关细腻度更低
https://developer.aliyun.com/article/1392682
https://developer.aliyun.com/article/1002990#slide-3
服务流量治理组件;本身就是一个单独的微服务;A微服务配置注册到Sentinel服务之后,访问A微服务接口,请求的流量就会被Sentinel服务监控到
<!-- SpringCloud alibaba sentinel 服务流量治理组件-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
https://sentinelguard.io/zh-cn/docs/basic-implementation.html
https://www.cnblogs.com/crazymakercircle/p/14285001.html#autoid-h2-0-0-0
https://www.cnblogs.com/crazytrip/p/15212602.html
https://gitee.com/lmf-2021/SpringCloud2024/blob/master/SpringCloud%E7%AC%AC3%E5%AD%A32024.html
分布式事务组件;本身就是一个单独的微服务;需要依赖服务注册与发现
<!-- Springcloud-seata-分布式事务整合依赖-->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
</dependency>
https://seata.apache.org/zh-cn/docs/overview/what-is-seata
https://blog.csdn.net/qq_48721706/article/details/122656490
(推荐)https://blog.csdn.net/weixin_43840661/article/details/135432796
https://blog.csdn.net/weixin_36027342/article/details/135897943
https://blog.csdn.net/qq_42767920/article/details/135743126
<!--micrometer-tracing-bom导入链路追踪版本中心 1-->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bom</artifactId>
<version>${micrometer-tracing.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--micrometer-tracing指标追踪 2-->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing</artifactId>
<version>${micrometer-tracing.version}</version>
</dependency>
<!--micrometer-tracing-bridge-brave适配zipkin的桥接包 3-->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-brave</artifactId>
<version>${micrometer-tracing.version}</version>
</dependency>
<!--micrometer-observation 4-->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-observation</artifactId>
<version>${micrometer-observation.version}</version>
</dependency>
<!--feign-micrometer 5-->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-micrometer</artifactId>
<version>${feign-micrometer.version}</version>
</dependency>
<!--zipkin-reporter-brave 6-->
<dependency>
<groupId>io.zipkin.reporter2</groupId>
<artifactId>zipkin-reporter-brave</artifactId>
<version>${zipkin-reporter-brave.version}</version>
</dependency>
https://www.cnblogs.com/cjsblog/p/11556029.html
https://blog.csdn.net/aixiaoyang168/article/details/100866159
https://juejin.cn/post/7051109463180181535
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。