
springboot
特李谱
为API生,为框架死,为debug奋斗一辈子,吃符号亏,上大小写的当,最后死在需求上
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mybatis存入new Date()没有时分秒
1:查看date包是不是import java.util.Date;2:实体类的类型为Date3:xml中的类型映射为TIMESTAMP<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />原创 2022-02-17 16:18:01 · 977 阅读 · 0 评论 -
springboot项目controller层调用service层方法报空指针解决方案
1:注解没有写@Referenceprivate UserService userService;2:生产者和消费者的启动顺序不对3:Reference注解的包导错了应该是import com.alibaba.dubbo.config.annotation.Reference;...原创 2019-07-09 17:29:52 · 5445 阅读 · 1 评论 -
bootstrap+springboot增删改查分页
1:pom.xml中加入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </depe...原创 2019-07-23 16:42:16 · 1525 阅读 · 1 评论 -
springboot集成redis存取map类型的值
1:从redis中根据key值取map集合@Resourceprivate RedisTemplate redisTemplate;Map<String,Object> redisMap= redisTemplate.opsForHash().entries(key);2:往redis中存map集合List<Product> productLsit = comm...原创 2019-07-24 20:10:20 · 6835 阅读 · 1 评论 -
redisTemplate常用方法
1:取出来是 Map<String,Object>//没有条件查询的话先查询redis缓存Map<String,Object> redisMap= redisTemplate.opsForHash().entries(key); //redis中没有的话查询数据库 if(redisMap!=null&&redisMap.size()>0){ ...原创 2019-07-30 09:11:20 · 1101 阅读 · 1 评论 -
springboot定时删除redis中key值为map开头的所有的缓存定时任务
1:启动类里面加注解@EnableScheduling2:创建定时任务类package com.limy.controller;import com.alibaba.dubbo.config.annotation.Reference;import org.springframework.beans.factory.annotation.Autowired;import org.sp...原创 2019-07-25 19:37:12 · 1363 阅读 · 0 评论 -
springboot使用日志并且生成简单的日志文件
1:pom.xml中引入依赖<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.1</version> ...原创 2019-07-25 19:56:13 · 385 阅读 · 0 评论 -
springboot配置redis
1:单机配置# Redis数据库索引(默认为0)spring.redis.database=1# Redis服务器地址#spring.redis.host=172.16.20.103spring.redis.host=127.0.0.1# Redis服务器连接端口spring.redis.port=6379# Redis服务器连接密码(默认为空)#spring.redis.pas...原创 2019-08-02 10:29:57 · 896 阅读 · 0 评论