| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @SpringBootTest(classes = LiJinApplication.class) |
| | | public class LuckyTest { |
| | |
| | | |
| | | @Test |
| | | public void test() { |
| | | String key = "lijinaccountmoney-20210526-1"; |
| | | redisTemplate.opsForValue().increment(key, 123); |
| | | Object obj = redisTemplate.opsForValue().get("lijinaccountmoney-20210526-1"); |
| | | System.out.println(obj); |
| | | String key = "createtblijin-tejia-6872490"; |
| | | System.out.println(redisTemplate.opsForValue().setIfAbsent(key, "1", 120, TimeUnit.SECONDS)); |
| | | } |
| | | |
| | | @Test |