需要的依赖 application.properties的配置 spring.redis.host=127.0.0.1 spring.redis.database=0 spring.redis.port=6379 spring.redis.password=handhand Controller package org.akk.redis;<