SpringBoot集成
不规则颜色
这个作者很懒,什么都没留下…
展开
-
springboot集成ES[单机极简版]
1.导入依赖,在yml中写下es配置(1) 依赖[spring-boot-dependencies.pom里本身自带了elasticsearch,这里拿出来标记使用]<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId></dependency&g.原创 2021-01-04 10:36:35 · 688 阅读 · 0 评论 -
springboot 启动加载数据库数据到redis缓存
简述:启动项目后, 加载数据库公共配置数据到redis中 [已集成: springboot + mybatis + redis]import org.springframework.data.redis.core.RedisTemplate;import org.springframework.jdbc.core.JdbcTemplate;import org.springframework.stereotype.Component;import org.springframework.uti.原创 2020-12-11 11:49:02 · 3617 阅读 · 2 评论 -
spring-boot-starter-data-redis 配置自定义缓存到期时间
package com.liuyan.liusheng.config.redis;import org.springframework.cache.CacheManager;import org.springframework.cache.annotation.CachingConfigurerSupport;import org.springframework.cache.annotation.EnableCaching;import org.springframework.context.a.原创 2020-12-11 09:40:56 · 1091 阅读 · 0 评论 -
springboot 集成 swagger2 注解分组
1.导入依赖<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version></dependency><!-- swagger2 接口API页面 --><dependency> <gr原创 2020-12-07 16:39:20 · 1084 阅读 · 0 评论