```### 2报错解决:添加bean定义。。/**
* 系统初始化时获取商品库存
* @throws Exception
*/
@Override
public void afterPropertiesSet() throws Exception {
List<GoodsVo> goodsList = goodsService.listGoodsVo();
if(goodsList == null){
return;
}
for(GoodsVo goodsVo : goodsList){
redisService.set(GoodsKey.getMiaoshaGoodsStock, ""+goodsVo.getId(), goodsVo.getStockCount());
}
}
@Bean
public Queue miaosha_queue() {
return new Queue(MIAOSHA_QUEUE, true);
}
- 压测 ./bin/jmeter.sh -n -t redis_mq/miaosha_redis_mq.jmx -l redis_mq/miaosha_redis_mq.jtl
### 3 nginx 反向代理
sudo sh /usr/tomcat8/bin/shutdown.sh
# 查看进程netstat -aptn | grep 8080
# kill -9 pid
sudo java -jar ~/Documents/tar/apache-jmeter-5.4.1/redis_mq/miaosha.jar
rm -f redis_mq/miaosha_redis_mq.jtl sudo vi ./redis_mq/miaosha_redis_mq.jmx./bin/jmeter.sh -n -t ./redis_mq/miaosha_redis_mq.jmx -l ./redis_mq/miaosha_redis_mq.jtl