code:
RedisConnection redisConnection = redisConectionFactory.getConnection();
Field jedisField = ReflectionUtils.findField(JedisConnection.class, "jedis");
Jedis jedis = (Jedis) ReflectionUtils.getField(jedisField, redisConnection);
Reflection problems
code changes:
RedisConnection redisConnection = redisConectionFactory.getConnection();
Field jedisField = ReflectionUtils.findField(JedisConnection.class, "jedis");
// Use only when getting properties modified with private
jedisField.setAccessible(true);
Jedis jedis = (Jedis) ReflectionUtils.getField(jedisField, redisConnection);
Read More:
- Error: (49,15) error: tag can access private in fragmentactivity
- “Securityerror: error ා 2060: Security sandbox conflict: external interface caller XXX cannot access XXX”
- remote: XXX Incorrect username or password (access token) fatal: Authentication failed for XXX
- Can not start, can not find QT pligins “windows” problem after installing QT vs environment 2021-06-13
- BUG——Could not resolve placeholder ‘xxx‘ in value ‘${xxx}‘
- Chrome your connection is not a private connection solution
- When error: XXX does not name a type XXX is prompted in QT
- Solution: regarding c2039, XXX is not a member of XXX
- Solutions to errors in the final running of JDBC programming
- Under win864 bit, install python, PyQt4 and sip. (final failure, only record)
- [debug notes] pointer error when STD:: vector is used in VTK “access conflict when reading location XXX”
- As Error:Failed to find configured root that contains /storage/emulated/0/xxx/xxx/xxx.png
- Securityerror: error ᦇ 2148: SWF file XXX cannot access local resources, only file system only
- Qt Failed opening project “xxx“: No plugin can open project type “text/plain“
- ssh can connect but sftp can not connect
- The software of Final Cut Pro x 10.5 failed to open, and it flashed back directly.
- Failed to load bundle…Unable to resolve module `xxx` from xxx: Module `xx` does not exist
- Curl returns empty reply from server. Due to the processing of special characters, curl cannot be accessed and the browser can access it.
- remote: error: GH007: Your push would publish a private email address.
- Duplicate modifier for the method XXX in type XXX