I have Spring Redis working using spring-data-redis with all default configuration likes localhost default port and so on.
Now
I found this within the spring boot doc section 24 paragraph 7
@Component
@ConfigurationProperties(prefix="connection")
public class ConnectionSettings {
private String username;
private InetAddress remoteAddress;
// ... getters and setters
}
Properties can then be modified via connection.property
Reference link: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-typesafe-configuration-properties