redis配置文件参考

Raod 2 years ago
parent 5e138b4a8d
commit ea9ac67269

@ -3,23 +3,25 @@
### 采用redis缓存 ### 采用redis缓存
#### 1.pom.xml文件改动 #### 1.pom.xml文件改动
- 1、增加redis依赖 - 1、增加redis依赖,删除exclusions即可
``` ```xml
<dependency> <dependency>
<groupId>com.anji-plus</groupId> <groupId>com.anji-plus</groupId>
<artifactId>spring-boot-gaea</artifactId> <artifactId>spring-boot-gaea</artifactId>
<version>2.0.5.RELEASE</version> <version>2.0.5.RELEASE</version>
<!--删除下方内容-->
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId> <artifactId>spring-boot-starter-data-redis</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
<!--删除-->
</dependency> </dependency>
``` ```
- 2、 删除ehcache相关依赖 - 2、 删除ehcache相关依赖
``` ```xml
<dependency> <dependency>
<groupId>net.sf.ehcache</groupId> <groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId> <artifactId>ehcache</artifactId>
@ -34,7 +36,7 @@
- 2、删除相关bean - 2、删除相关bean
文件地址com.anjiplus.template.gaea.business.config.BusinessAutoConfiguration.java 文件地址com.anjiplus.template.gaea.business.config.BusinessAutoConfiguration.java
``` ```java
@Bean @Bean
public CacheHelper gaeaCacheHelper(){ public CacheHelper gaeaCacheHelper(){
return new ReportCacheHelper(); return new ReportCacheHelper();

Loading…
Cancel
Save