JAVA全系列 教程
3762个小节阅读:7091.3k
目录
C语言快速入门
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
用户购买商品的业务逻辑。整个业务逻辑由4个微服务提供支持:
对给定的商品扣除仓储数量。
xxxxxxxxxx
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.4</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.itbaizhan</groupId>
<artifactId>itbaizhan-interface</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- dubbo和springboot整合依赖包 -->
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
</dependency>
<!-- dubbo 注册中心nacos依赖包 -->
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-registry-nacos</artifactId>
</dependency>
xxxxxxxxxx
server:
port: 8102
#====================================stream =============================================
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/seata-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
username: root
password: 123456
application:
name: account-service
#====================================Dubbo config===============================================
dubbo:
application:
name: account-service
qosEnable: false
protocol:
name: dubbo
port: -1
registry:
address: nacos://192.168.47.100:8848
xxxxxxxxxx
/*
主启动类
*/
@Slf4j
@MapperScan("com.itbaizhan.mapper")
@EnableDubbo
@SpringBootApplication
public class StockApplication {
public static void main(String[] args) {
SpringApplication.run(StockApplication.class,args);
log.info("****************** 库存系统服务启动成功 **********");
}
}