SpringCloud(一):学习搭建分布式项目(入门)
一、技术选型
Spring Cloud Hoxton.SR8
Spring Boot 2.3.0.RELEASE
二、模块设计
springcloud父工程(Project)下初次带着3个子模块(Module) ------ pom
shop-common【封装的整体entity / 接口 / 公共配置等】 ------ jar
shop-user-807x【服务提供者】 ------- war
shop-product-808x【服务提供者】 ------- war
shop-order-809x【服务消费者】 ------- war
注:端口号分配是为后面集群预留。
三、开始搭建分布式项目
1.先创建一个父工程
2.在父工程里面引入依赖
<?xml version="1.0" encoding="UTF-8"?>
<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.0</modelVersion>
<groupId>com.nine.winfred</groupId>
<artifactId>SpringCloud-Demo</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>shop-user</module>
<module>shop-common</module>
<module>shop-product</module>
<module>shop-order</module>
</modules>
<properties>