class JedisPoolFactory implements FactoryBean<Pool<Jedis>> {
    private String key;
    private Class<?> poolClass;

    @Autowired
    private AutoConfigureBeans autoConfigureBeans;

    private boolean inited;
    private Pool<Jedis> jedisPool;

    public JedisPoolFactory(String key, Class<? extends Pool<Jedis>> poolClass){
        this.key = key;
        this.poolClass = poolClass;
    }

    public String getKey() {
        return key;
    }

    @Override
    public Pool<Jedis> getObject() throws Exception {<FILL_FUNCTION_BODY>}

    @Override
    public Class<?> getObjectType() {
        return poolClass;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}

        if (!inited) {
            jedisPool = (Pool<Jedis>) autoConfigureBeans.getCustomContainer().get("jedisPool." + key);
            inited = true;
        }
        return jedisPool;
    
<no_super_class>