提交 c3128d6c 编写于 作者: 武汉红喜's avatar 武汉红喜

spring cache redis

上级 09cb3693
......@@ -17,6 +17,15 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!--<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>-->
</dependencies>
......
package org.hongxi.whatsmars.boot.cache;
public class Book {
import java.io.Serializable;
public class Book implements Serializable {
private static final long serialVersionUID = 3383972798607883427L;
private String isbn;
private String title;
......
spring:
cache:
type: redis
cache-names: books
# guava.spec: maximumSize=500,expireAfterWrite=360m
redis:
host: 127.0.0.1
port: 6379
password:
timeout: 0
pool:
max-idle: 8
min-idle: 1
max-active: 8
max-wait: -1
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册