Home > Back-end >  Springboot configuration in the class jedispool bean can't inject jedisUtils tools
Springboot configuration in the class jedispool bean can't inject jedisUtils tools

Time:09-19

In the configuration class Jedispool configuration, and returns the Jedispool, get less than Jedispool in utility class, returns Null. Can get in the test class, paste the code below and breakpoint test results: summary is test class can get to inject jedispool, tool is not in the class, ask bosses teach

CodePudding user response:

Someone had the same problem

CodePudding user response:

Can first defines redisutil into beans again will automatically injected into the service utility class autowire method can use the tools

CodePudding user response:

Your tools is their new call, not automatic injection, so tools class jedistool cannot automatically injected, so to null.
  • Related