Skip to content

Commit

Permalink
UPDATE README
Browse files Browse the repository at this point in the history
  • Loading branch information
techa03 committed Sep 2, 2018
1 parent 062e755 commit 9d750d0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ ZooKeeper | 分布式协调服务 | [http://zookeeper.apache.org/](http://zooke
Dubbo | 分布式服务框架 | [http://dubbo.io/](http://dubbo.io/)
Redis | 分布式缓存数据库 | [https://redis.io/](https://redis.io/)
ActiveMQ | 消息队列 | [http://activemq.apache.org/](http://activemq.apache.org/)
KafkaMQ | 消息队列 | [http://kafka.apache.org/](http://kafka.apache.org/)
Logback | 日志组件 | [https://logback.qos.ch/](https://logback.qos.ch/)
Protobuf & json | 数据序列化 | [https://github.com/google/protobuf](https://github.com/google/protobuf)
Jenkins | 持续集成工具 | [https://jenkins.io/index.html](https://jenkins.io/index.html)
Expand Down Expand Up @@ -83,7 +84,7 @@ LayUI | 前端UI框架 | [http://www.layui.com/](http://www.layui.com/)

#### 项目启动方法:

- 参照redis官网安装redis,本地默认端口启动activemq,zookeeper(zookeeper这个一定要装啊,不然启动不了,开启服务后倾检查2181端口是否正常开启了);
- 参照redis官网安装redis,本地默认端口启动activemq,kafka,zookeeper(开启服务后倾检查2181端口是否正常开启了);

- 找到seckill.sql文件,在本地mysql数据库中建立seckill仓库并执行seckill.sql完成数据初始化操作;

Expand All @@ -109,10 +110,11 @@ mvn clean install -Plocal
#### 并发场景:
目前实现了几种秒杀方案

测试地址:http://localhost:18080/goodsKill/swagger-ui.html#/
- 实现方式一:sychronized同步锁实现
可以通过swagger进行测试,接口地址:http://localhost:18080/goodsKill/seckill/sychronized/{seckillId}
- 实现方式二:redisson分布式锁实现
可以通过swagger进行测试,接口地址:http://localhost:18080/goodsKill/seckill/redisson/{seckillId}
- 实现方式三:activemq实现
- 实现方式四:kafkamq实现

#### 编译部署注意事项:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

//数据库驱动以及连接信息
driver=com.mysql.cj.jdbc.Driver
url=jdbc:mysql://192.168.6.101:3306/seckill?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC
url=jdbc:mysql://localhost:3306/seckill?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC
username=root
//数据库密码(已加密,本项目AESUtil工具类可以加密)
password=+tkfyiKcqLiFlgt7GSnxtw==

//配置zookeeper注册中心地址
zookeeper_address=zookeeper://192.168.6.101:2181
zookeeper_address=zookeeper://localhost:2181
//配置mq部署地址
mq_address=tcp://192.168.6.101:61616
mq_address=tcp://localhost:21591
//配置缓存服务器地址
cache_address=localhost
cache_address=localhost
//kafka服务器地址
bootstrap.servers=localhost:9092
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
//配置zookeeper注册中心地址
zookeeper_address=zookeeper://192.168.6.101:2181
zookeeper_address=zookeeper://127.0.0.1:2181
mq_address=tcp://localhost:21591

0 comments on commit 9d750d0

Please sign in to comment.