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

how can i use jpa and redis repositories together?

$
0
0

i know that spring boot provide repository for redisusing @redisHash annotation and implementing crud repository like a jpa repository

@RedisHash("example")public class RedisEntity {        @Id        @GeneratedValue        private String id;        private String name;}

and now, i am already using jpa repository implementing jpa repository and using@entity annotation in my project

@Entity("example")public class JPAEntity {    @Id    @GeneratedValue    private String id;    private String name;}

and i want to add redis repository in my project for caching. but i have faced with error

i want to use two repositories togetherone is for redis using @redisHash that can be used for cacheanother is for jpa using @entity that can be used for database

how can i use together .


Viewing all articles
Browse latest Browse all 2204

Trending Articles



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