recently, when (spring) integrates redis in a project, I always hold a null pointer exception when going to the factory instance:
but the unit test is always normal:
the following is the redis-config.xml file
public class SpringContextUtil implements ApplicationContextAware{...}