-4

I want to use spring-boot-starter-data-redis with custom configuration properties:

redis:
 host: localhost
 port: 6379
 password: pass
 timeout: 5000

It's working only when I use:

spring:
 redis:
 host: localhost
 port: 6379
 password: pass
 timeout: 5000

Do you know how I configure this?

asked May 15 at 10:48

1 Answer 1

0

You could create aliases using placeholders:

spring:
 redis:
 host: ${redis.host}
 port: ${redis.port}
 password: ${redis.password}
 timeout: ${redis.timeout}
answered May 16 at 18:14
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.