ITeye博客

pyl1164的博客

pyl1164 · 共 3 篇文章

redis集群持久化数据重启恢复

网上已有很多关于redis的集群部署方案的文章,这里就直接忽略了。 目前考虑redis集群宕机后,如果有数据是持久化了的,那么重启的时候如何恢复呢? 网上给的答案都是使用dump.rdb或者aof方案来实现 修改redis_*.conf配置文件,屏蔽aof方案的持久化方式 # AOF and RDB persistence can be enabled at the same time without problems. # If the AOF is enabled on startup Redis will load the AOF, that is the file # with th…

2019-07-01 15:24 · redis · 评论(0)

spring 注入静态变量 报错 no property

功能描述: 发送短信工具类:该工具类定义了静态发短信的方法,所有使用的用户名,密码都需要定义为静态,这里需要通过spring 读取配置文件注入 首先定义静态变量: private static String host=""; private static String username=""; private static String password=""; 下面是静态的发送短信的方法: /** * @param host * @param username * @param password * @param SMSBean * @return */ public static Str…

2012-11-01 17:54 · 评论(0)

用qr生成带logo的二维码

需求描述:开发的android版本应用 需要在pc端提供二维码下载路径扫描 下面是功能实现: 需要jar包:Qrcodeen.jar 先实现二维码生成: public void create_image(String sms_info,String filePath,String logoPath)throws Exception{ try{ Qrcode testQrcode =new Qrcode(); testQrcode.setQrcodeErrorCorrect('M'); testQrcode.setQrcodeEncodeMode('B'); testQrcode.setQrc…

2012-11-01 11:37 · java 二维码 · 评论(2)