File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
java/io/kimmking/cache/service Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ public class UserServiceImpl implements UserService {
15
15
UserMapper userMapper ;
16
16
17
17
// 开启spring cache
18
- @ Cacheable // (key="#id",value="userCache")
18
+ @ Cacheable (key ="#id" ,value ="userCache" )
19
19
public User find (int id ) {
20
- // System.out.println(" ==> find " + id);
20
+ System .out .println (" ==> find " + id );
21
21
return userMapper .find (id );
22
22
}
23
23
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ spring:
7
7
password :
8
8
url : jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
9
9
driver-class-name : com.mysql.jdbc.Driver
10
- # cache:
11
- # type: redis
10
+ cache :
11
+ type : redis
12
12
redis :
13
13
host : localhost
14
14
lettuce :
15
15
pool :
16
- max-active : 32
16
+ max-active : 16
17
17
max-wait : 10ms
18
18
19
19
# type: ehcache
You can’t perform that action at this time.
0 commit comments