解决从从redis 获取token 有时候会获取不到的问题
| | |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | WxUtil wxUtil=new WxUtil(); |
| | | String accessToken="0"; |
| | | try { |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken= stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | WxUtil wxUtil = new WxUtil(); |
| | | String accessToken = "0"; |
| | | try { |
| | | accessToken = stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken = stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | // } catch (IOException ioe) { |
| | | // ioe.printStackTrace(); |
| | | // } |
| | | accessToken =wxUtil.stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get().toString(); |
| | | accessToken =wxUtil.stringRedisTemplate.boundValueOps("access_token:access_token:" + ConstantPropertiesUtil.WX_OPEN_APP_ID).get(); |
| | | return accessToken; |
| | | } |
| | | |