-
Notifications
You must be signed in to change notification settings - Fork 100
springboot shiro常见问题
yadong.zhang edited this page May 22, 2018
·
1 revision
问题描述
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)
...
...
解决方案
该项目依赖于Redis,请修改相关配置