<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Downt的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Downt</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Downt]]></copyright><item><title><![CDATA[SSM之Redis自动/手动设置缓存]]></title><link>https://blog.youkuaiyun.com/Downt/article/details/116711808</link><guid>https://blog.youkuaiyun.com/Downt/article/details/116711808</guid><author>Downt</author><pubDate>Wed, 12 May 2021 17:08:36 +0800</pubDate><description><![CDATA[Redis Spring配置（供参考！）

1添加redis自动操作配置

1可以通过设置相关类的mapper.xml加入&lt;cache type="com.xxx.util.RedisCache"&gt;&lt;/cache&gt;用来调用一个工具类并实现Cache接口，从而在实现业务SQL时，自动使用redis存入对应的SQL返回的内容，达到提高性能的效果

具体代码部分：

对应需要使用redis的mapperXML文件：


&lt;?xml version="1.0" encoding="UT]]></description><category></category></item><item><title><![CDATA[Exception in thread “main“ org.hibernate.hql.internal.ast.QuerySyntaxException: Admins is not mapped]]></title><link>https://blog.youkuaiyun.com/Downt/article/details/116529299</link><guid>https://blog.youkuaiyun.com/Downt/article/details/116529299</guid><author>Downt</author><pubDate>Sat, 08 May 2021 15:29:31 +0800</pubDate><description><![CDATA[Exception in thread "main" org.hibernate.hql.internal.ast.QuerySyntaxException: Admins is not mapped [from Admins where adminname=:name and adminpwd=:pwd]等错误常见问题

1 Hql错误，

HQL是面向对象的查询语言

a、from 后接 类名，不是数据库表名，where 是类属性名，不是数据库字段名 注意区分大小写

b、使用注解的注意把对应类注解为实]]></description><category></category></item></channel></rss>