|
@@ -35,9 +35,12 @@ import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
|
|
+import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|
|
|
+import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@@ -88,8 +91,8 @@ public class TestController {
|
|
RedisLockUtil redisLockUtil;
|
|
RedisLockUtil redisLockUtil;
|
|
|
|
|
|
|
|
|
|
- @GetMapping("/test")
|
|
|
|
- public String test() throws Exception {
|
|
|
|
|
|
+ @PostMapping("/test")
|
|
|
|
+ public String test(String test) throws Exception {
|
|
|
|
|
|
|
|
|
|
// List<Folder> list = folderService.list(new LambdaQueryWrapper<Folder>().eq(Folder::getId, 1));
|
|
// List<Folder> list = folderService.list(new LambdaQueryWrapper<Folder>().eq(Folder::getId, 1));
|
|
@@ -130,8 +133,9 @@ public class TestController {
|
|
// String key = String.format(RedisLockKey.LOCK_SCENE_SYNC, "123");
|
|
// String key = String.format(RedisLockKey.LOCK_SCENE_SYNC, "123");
|
|
// redisLockUtil.lock(key, 100000);
|
|
// redisLockUtil.lock(key, 100000);
|
|
|
|
|
|
-
|
|
|
|
- return "123123";
|
|
|
|
|
|
+ JedisConnectionFactory bean = (JedisConnectionFactory)SpringUtil.getBean(RedisConnectionFactory.class);
|
|
|
|
+ int maxIdle = bean.getPoolConfig().getMaxIdle();
|
|
|
|
+ return "" + maxIdle;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|