package Ġnet . sun show . badge . provider . redis Ċ Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . core . io . Class Path Resource Ċ import Ġorg . springframework . data . redis . connection . Redis Password Ċ import Ġorg . springframework . data . redis . connection . Redis Standalone Configuration Ċ import Ġorg . springframework . data . redis . connection . lett uce . Let t uce ConnectionFactory Ċ import Ġorg . springframework . data . redis . core . String Redis Template Ċ import Ġorg . springframework . data . redis . core . script . Redis Script Ċ Ċ @ Configuration Ċ class ĠTest Redis Config Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġredis ConnectionFactory (): ĠLet t uce ConnectionFactory Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġconfig Ġ= ĠRedis Standalone Configuration (" 1 2 7 . 0 . 0 . 1 ", Ġ 6 3 7 9 ) ĊĊĠĠĠĠĠĠĠ Ġconfig . database Ġ= Ġ 0 ĊĠĠĠĠĠĠĠ Ġconfig . password Ġ= ĠRedis Password . of ("") ĊĊĠĠĠĠĠĠĠ Ġreturn ĠLet t uce ConnectionFactory ( config ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġstring Redis Template (): ĠString Redis Template Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠString Redis Template ( redis ConnectionFactory ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġtest Script (): ĠRedis Script < String > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRedis Script . of ( Class Path Resource (" scripts / test . lua "), ĠString :: class . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġtest Concurrency Script (): ĠRedis Script < List <* >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRedis Script . of ( Class Path Resource (" scripts / test _ concurrency . lua "), ĠList :: class . java ) ĊĠĠĠ Ġ} Ċ Ċ }