jbzhang99 / springboot Goto Github PK
View Code? Open in Web Editor NEWThis project forked from taotaoliuliu/springboot
springbootDemo
This project forked from taotaoliuliu/springboot
springbootDemo
1 集成 elementUI vue.js 2 集成redis vue.js 3 lua+redis+http+ngnix 后台服务代码 4 注意storm+kafka jar的版本要和kafka运行的版本一致############ 5 加入秒杀 1 秒杀结束 2排队中 3 秒杀成功 4 排队之后 秒杀失败 5 流程 1 限流(库存*n为限流总量##待处理消息个数比较redisUtil.llen) 2判断是否在处理队列中 (reids hset) 3 将消息加入到队列中 (rpush) 4 出队列(blpop 阻塞式 保证安全) 减库存 如果库存不够直接返回失败!生成token 5 用户下单时候验证token 否者没有资格 如果用户3m不下单 token失效 6 加入在线聊天 7 加入分布式事务 8 加入页面h+UI #################################### 2018-10-22 加入了 h+UI #################################### 2018-10-23 websocket 可以推动消息给用户 ################### 2018-10-24 加入了 在线聊天 目前已经给完成 特别注意的地方是 message.setSender(currentsession+""); //这个地方一定要是字符串 传int值后台收不到 要和后台的类型对应 过程 1 先建立连接 2 页面通过连接发送消息给websocket 3 connect 连接以后 会把session存到map里面 同时 session 里面回话的channel 里面这个发送信息 4 ############### 加入kafka+storm HotProductTopology 这个是测试通过的 StormKafkaTopo 也是测试通过的 #################################### 2019-1-2 加入了elementui 位置src/main/resources/static/html/ad/ad.html 模板访问:http://localhost:8080/static/html/element/index.html #################### 2019-01-03 RedisHelper 里面有 redis+lua 入库 测试锁库的脚本 ########### 测试各种表单提交 http://localhost:8080/static/html/test/add.html ############### elememt UI 管理页面 http://localhost:8080/static/html/element/index2.html h+UI http://localhost:8080 ############################################################################# stompClient.connect({name:"lsl2"}, function (frame) { important name 是后台认证的用户 需要加 setConnected(true); console.log('Connected: ' + frame); stompClient.subscribe('/ricky/topic/greetings', function (greeting) { //subscribe('/ricky/topic/greetings' 这个地方就不在需要加了@@@@@ showGreeting(JSON.parse(greeting.body).content); }); }); /*######################## * 用户可以订阅来自"/topic"和"/user"的消息, * 在Controller中,可通过@SendTo注解指明发送目标,这样服务器就可以将消息发送到订阅相关消息的客户端 * * 在本Demo中,使用topic来达到群发效果,使用user进行一对一发送 * * 客户端只可以订阅这两个前缀的主题 */ config.enableSimpleBroker("/topic", "/user"); ####################################### 先删缓存 再更新数据库 缓存数据库不一致 可以用 读写放到内存队列中去 #################################### ######2019-05-29 实现了分库分表 shardingsphere ######## 问题 1 pom里面加入 <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>sharding-jdbc-spring-boot-starter</artifactId> <version>4.0.0-RC1</version> </dependency> 不然老是让找数据库 问题2 不使用 druid 因为springboot 没有集成 ####################################### ######2019-05-31 加入分布式锁实现 zookeeper redis 实现 ######## ##### 2019-06-06 加入ES ElasticsearchTemplate 的crud已经做完 ##### 2019-06-06 加入ES ##### 2019-06-10 加入RedisTemplate 注意要配置序列化合反序列化 RedisConfiguration RedisTemplate crud已经做完 ##### 2019-06-10 加入RedisTemplate ##### 2019-06-11 加入数据迁移 只需要配置一下配置文件 MoveDataService ##### 2019-06-11 加入数据迁移 只需要配置一下配置文件 可靠消息最终一致###### 1 插入订单 把消息发送到mq 同时新增一条msgLog 2 mq消费消费 如果消费成功 则 修改msgLog 如果失败则修改msglog为失败 3 启动定时任务 循环msglog表 找出不成功的 发消息到 mq ######bbc的可靠消息最终一致 1 如果发现有降级 则 新建日志 还要检查幂等 (如果发现redis中有执行完的值 则不能新建 因为已经) HystrixLogs 里面方法名 参数 2 将 HystrixLogs 发送到mq里面 3 启动定时任务 将异常的请求 重新执行 秒杀############## 测试时间 ### 25W库存 30W次抢购请求 5:14 执行完 QPS 1592.077 秒杀############## 测试时间 ### 25W库存 100W次抢购请求 5:14 执行完 QPS 1035.749 秒杀过程 1 redisUtil.getkeylistsize(productid+"") 判断商品队列里面的用户数 加入用户数>stock 库存数量 则秒杀失败 2 判断 用户是否在队列里面 如果在直接返回 防止重复秒杀 3 秒杀成功 把用户uuid 放入到商品为key的里面 4 订单信息放到mq 消息中间件 ##### 2019-07-04 加入支付宝支付 和 微信支付 ####### 2019-07-04 加入支付宝支付 和 微信支付
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.