JedisPool injects spring into null

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{...}
  • this project adopts multi-maven structure, and there are a series of problems when sub-maven is packaged. Causes no communication between submodules
  • Mar.05,2021

    the file was not introduced,

    cannot be directly configured in web.xml (the solution is the introduction of import)

    the specific reason remains to be studied;

    Menu