提交 15fb2a50 编写于 作者: Y yadong.zhang

去掉enableRedis配置项,启动项目必须配置redis

上级 197e4b8b
......@@ -86,7 +86,7 @@ ps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇
1.实体类没有setter、getter方法。解决办法:[安装lombok](https://www.zhyd.me/article/61)
你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群[190886500](http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60),进群可以选择性的备注:`欧巴群主我爱你`
你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群[190886500](http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60),进群可以选择性的备注:~~欧巴群主我爱你~~(咳咳,鉴于部分群友的抗议,该备注就不用了),麻烦大家换成:`我猜群主一定很帅`
### 图片预览
......
......@@ -19,7 +19,7 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/dblog
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: root
application:
......@@ -131,8 +131,6 @@ banner:
charset: UTF-8
####################################自定义配置##########################################
app:
# 是否启用redis
enableRedis: true
# 是否启用kaptcha验证码
enableKaptcha: false
qiniu:
......
......@@ -65,10 +65,6 @@ public class RedisCacheAspect {
@Around("pointcut()")
public Object handle(ProceedingJoinPoint point) throws Throwable {
if(!propertiesConfig.getEnableRedis()){
LOGGER.info("未启用Redis");
return point.proceed();
}
// 获取拦截的方法名
Signature sig = point.getSignature();
MethodSignature msig = null;
......
......@@ -42,13 +42,8 @@ import java.util.Map;
@Data
public class AppPropertiesConfig {
public Boolean enableRedis;
public Boolean enableKaptcha;
public boolean getEnableRedis() {
return null == enableRedis ? false : enableRedis;
}
public boolean getEnableKaptcha() {
return null == enableKaptcha ? false : enableKaptcha;
}
......
......@@ -53,7 +53,7 @@ public class BlogWebApplication implements ApplicationRunner {
}
@Override
public void run(ApplicationArguments applicationArguments) throws Exception {
public void run(ApplicationArguments applicationArguments) {
LOG.info("博客部署完成,当前时间:" + DateUtil.date2Str(new Date(), DateConst.YYYY_MM_DD_HH_MM_SS_EN));
}
}
......@@ -19,7 +19,7 @@ spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/dblog
url: jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username: root
password: root
application:
......@@ -132,8 +132,6 @@ banner:
####################################自定义配置##########################################
app:
# 是否启用redis
enableRedis: true
# 是否启用kaptcha验证码
enableKaptcha: false
qiniu:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册