标签:复制 业务 code cloud pen 抽取 framework href run
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
客户端消费者80 要调 微服务提供者8001,客户端应该只有controller。
先去复制实体类,后面会抽取。
ApplicationContextConfig
启动两个服务
输入:http://localhost/consumer/payment/create?serial=111
浏览器显示插入成功
但是数据库有主键,serial为null
原因:
没有加@RequestBody注解
标签:复制 业务 code cloud pen 抽取 framework href run
原文地址:https://www.cnblogs.com/sunyanblog/p/12785706.html