使用Spring RedisTemplate操作list元素时不弹出(删除)只进行获取
今天做一个小项目要用到redis查询,遇到一个很奇怪的现象:使用redis缓存一个list,然而我发现每次缓存完后,第二次获取是正常的,第三次的时候缓存就又丢了,如此反复。代码如下:public List<ItemCat> selectAllByStatus(int status) { List<ItemCat> itemCats = null;
今天做一个小项目要用到redis查询,遇到一个很奇怪的现象:使用redis缓存一个list,然而我发现每次缓存完后,第二次获取是正常的,第三次的时候缓存就又丢了,如此反复。代码如下:public List<ItemCat> selectAllByStatus(int status) { List<ItemCat> itemCats = null;
今天在学校机房clone项目的时候,发现下载依赖报错Cannot access nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public) in offline mode and the artifact org.springframework.boot:spring-boot-starter-parent:pom:2.3.
使用逆向工程生成代码时,会发现mapper类和*mapper.xml会出现一个类中重复生成多次代码的问题,这会导致项目运行时初始化mapper失败并报错翻阅mybatis官方API文档,发现了一下这句话MySql does not properly support SQL catalogs and schema. If you run the create schema command in My
今天在写demo的时候,发现文件上传时抛了空指针异常网上试了很多种办法,比如新建config类、禁用自带MultipartResolver之类的方法都没解决。网页接口:<form th:action="@{/file/upload}" method="post" > <input type="file"
1.Thymeleaf简介官方网站:https://www.thymeleaf.org/index.htmlThymeleaf是用来开发Web和独立环境项目的现代服务器端Java模板引擎。Thymeleaf的主要目标是为您的开发工作流程带来优雅的自然模板 - HTML。可以在直接浏览器中正确显示,并且可以作为静态原型,从而在开发团队中实现更强大的协作。借助Spring Framework的模块,可