Spring Cloud 微服务分布式架构学习
记录一下自己学习Spring Cloud的过程~
热部署Devtools
1、Adding devtools to your project
在cloud-provider-payment8001模块的pom文件中增加devtools依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
2、Adding plugin to your pom.xml
在父工程的pom文件中添加
<build>
<!--<finalName>你的工程名</finalName>(单一工程时添加)-->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>

本文记录了Spring Cloud微服务架构的学习过程,包括热部署Devtools的配置,消费者订单模块的创建步骤,如创建Maven项目、编写YML、启动类和业务类。同时介绍了RestTemplate在访问REST服务中的应用。最后,文章详细阐述了如何进行工程重构,将支付和订单模块中的共性部分提取到新的cloud-api-commons模块,并完成打包发布。
最低0.47元/天 解锁文章
238

被折叠的 条评论
为什么被折叠?



