1。
spring-boot-starter-redisを導入する
< 依存関係 >
< groupId > org.springframework.boot </ groupId >
< たartifactId >春・ブート・スターター-Redisの</ たartifactId >
</ 依存関係 >
#REDIS(RedisProperties)#Redisのデータベースインデックス(デフォルトは0である)spring.redis.database = 0 #Redisのサーバーアドレスspring.redis.host = 192.168 。0 。58 #Redis サーバー接続ポートspring.redis.port = 6379 #Redisサーバー接続パスワード(デフォルトは空)spring.redis.password = #接続の最大接続数(負の値を使用して制限なしを示す)spring.redis.pool.max- active = 8 #接続プールの最大ブロッキング待機時間(負の値を使用して制限がないことを示します)spring.redis.pool.max- wait = -1 #接続プールの最大のアイドル接続spring.redis.pool.max-idle = 8 #接続プールの最小アイドル接続spring.redis.pool.min-idle = 0 #接続タイムアウト時間(ミリ秒)spring.redis.timeout = 0
翻訳元:https://www.cnblogs.com/ityouknow/p/5748830.html