File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/com/gcms/v3/global/redis Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1
1
package com .gcms .v3 .global .redis ;
2
2
3
+ import jakarta .transaction .Transactional ;
3
4
import lombok .RequiredArgsConstructor ;
4
5
import org .springframework .context .annotation .Bean ;
5
6
import org .springframework .context .annotation .Configuration ;
@@ -19,11 +20,13 @@ public RedisConnectionFactory redisConnectionFactory() {
19
20
}
20
21
21
22
@ Bean
23
+ @ Transactional
22
24
public RedisTemplate <String , Object > redisTemplate () {
23
25
RedisTemplate <String , Object > template = new RedisTemplate <>();
24
26
template .setValueSerializer (new StringRedisSerializer ());
25
27
template .setHashValueSerializer (new StringRedisSerializer ());
26
28
template .setConnectionFactory (redisConnectionFactory ());
29
+ template .setEnableTransactionSupport (true );
27
30
return template ;
28
31
}
29
32
}
You can’t perform that action at this time.
0 commit comments