Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2203

Env variables in data class in Redis model annotation

$
0
0

Troubling to specify dynamic env variable in the model class @Hashkey Redis annotation.

Model:

@RedisHash("${spring.redis.namespace}:Book")public class Book {    @Id    private String id;    private String name;}

My application.properties file:

spring.redis.namespace=local

The resulting key is "${spring.redis.namespace}:Book" instead of local:Book

Could anyone help me with this?


Viewing all articles
Browse latest Browse all 2203

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>