-
Notifications
You must be signed in to change notification settings - Fork 386
DBlog 常见问题
yadong.zhang edited this page May 22, 2018
·
2 revisions
问题描述
git clone DBlog后,ide打开提示编译报错,发现实体类中缺少setter和getter方法,这是因为DBlog中使用了lombok插件所致,只需要安装对应的lombok插件即可。
解决方案:
idea安装lombok: file->settings->plugins->Browse Repositories->输入lombok
,点击搜索->选中lombok点击install->安装完成后重启idea
问题描述
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #20 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'c.commentCount' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
...
...
解决方案
注意,异常提示中的 sql_mode=only_full_group_by ,这是MySQL 5.7.9版本sql_mode=only_full_group_by
问题,请参考以下文章:
https://www.cnblogs.com/jim2016/p/6322703.html https://www.cnblogs.com/grimm/p/5751911.html
问题描述
org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:204)
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:348)
at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:129)
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:92)
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:79)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:194)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:169)
at org.springframework.data.redis.core.RedisTemplate.hasKey(RedisTemplate.java:658)
...
...
解决方案
DBlog博客依赖于Redis,请参考【DBlog-项目说明】中的2.4(配置项目-修改(resources/application.yml)配置文件)的说明修改配置
问题描述
如图:
造成这种问题有两种原因:
-
sys_config
表中的qiniu_base_path
字段内容未修改 - 七牛云Bucket中未添加相关的“图片样式”
解决方案
- 修改
sys_config
表中的qiniu_base_path
字段为自己七牛云Bucket提供的路径 - 在七牛云中添加相对应的“图片样式”。设置方式,参考下图