###基于SpringBoot的微信点餐系统
- 怎么接入微信公众号,appId,appSecret,token,openId
- 微信支付
- 微信扫码登陆
- websocket消息推送
- 微信网页授权的整个过程
- 微信菜单怎么生成
- springboot redis怎么用
- redis分布式锁
- java8 lambda表达式
- ResultVO
微信公众平台
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>2.7.0</version>
</dependency>
微信支付
<dependency>
<groupId>cn.springboot</groupId>
<artifactId>best-pay-sdk</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
webSocket
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
@Autowired
private StringRedisTemplate redisTemplate;
redisTemplate.opsForValue().set(code, openid.toString() , expire, TimeUnit.SECONDS);
String openId = redisTemplate.opsForValue().get(code);
RestTemplate
RestTemplate restTemplate=new RestTemplate();
String response=restTemplate.getForObject(url,String.class);