The bean 'redisTemplate' could not be injected as a 'org.springframework.data.redis.core.RedisTempla


Springboot統合redisを使用する場合、プロジェクトのエラーを開始します.
The bean 'redisTemplate' could not be injected as a 'org.springframework.data.redis.core.RedisTemplate' because it is a JDK dynamic proxy that implements:
	org.springframework.data.redis.core.RedisOperations
	org.springframework.beans.factory.BeanClassLoaderAware

次にactionを示します
Action:

Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.

RedisTemplateはJDKが所有する動的エージェントを使用して作成されたエージェントオブジェクトであることがわかります.次にactionはCGLIbエージェントの使用を推奨します.proxyTargetClass=trueを設定する必要があります.プロファイルに次の構成を追加します.
spring.aop.proxy-target-class: true