We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config:
spring: redis: database: 6 host: ${extraEnvHost} port: 6379 password: ${redis.pwd} pool: minIdle: 1 maxIdle: 10 maxWait: 3 maxActive: 8 @Component public class JedisCompent { @Autowired private RedisConnectionFactory connectionFactory; @Autowired private Jedis jedis; @Bean public Jedis jedis(){ Field jedisField = ReflectionUtils.findField(JedisConnection.class, "jedis"); ReflectionUtils.makeAccessible(jedisField); Jedis jedis = (Jedis) ReflectionUtils.getField(jedisField, connectionFactory.getConnection()); return jedis; } @Bean public JReJSON jReJSON(){ return new JReJSON(jedis); } } @Slf4j @RestController @RequestMapping("/redis") public class ExController { @Autowired private RedisTemplate redisTemplate; @Autowired private JReJSON jReJSON; @Autowired private Jedis jedis; @GetMapping(value = "/useRedisJSON") public int useRedisJSON(){ long stime = SystemClock.now(); jedis.set("kkkk","asdfasdf"); String testJsonObjectName = "robben"; jReJSON.set(testJsonObjectName,new Object()); //success in db6 jReJSON.set(testJsonObjectName,21,new Path(".age")); //error: ERR new objects must be created at the root return 0; } }
As shown in the figure above,Sometimes it fails!
Sometimes in db6 have a "robben" object is "{}" ,but After multiple executions,in db0 will get a right result({"age":21}). why?
if my don't set db in application.yml,All correct!
Is it because the jedis I created did not use the connection pool?
The text was updated successfully, but these errors were encountered:
@robben009 Your jedis connections are being managed by spring-data-redis. That may be a better place to ask.
Sorry, something went wrong.
No branches or pull requests
config:
As shown in the figure above,Sometimes it fails!
Sometimes in db6 have a "robben" object is "{}" ,but After multiple executions,in db0 will get a right result({"age":21}). why?
if my don't set db in application.yml,All correct!
Is it because the jedis I created did not use the connection pool?
The text was updated successfully, but these errors were encountered: