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

Spring Data Redis Parameter does not have a name

$
0
0

I have a spring boot project which is using redis as cache, I have an entity which i want to save and use named RQuestionResult:

@Data@NoArgsConstructor@AllArgsConstructor@RedisHash("questionResult")public class RQuestionResult implements Serializable {    @Id    private Long questionId;    private Map<String, String> byProvince;    private Map<Long, Map<String, Double>> byCount;}

it saves fine to redis, but when i try to access it using spring data redis repository:

public interface RQuestionResultRepository extends CrudRepository<RQuestionResult, Long> {    RQuestionResult findByQuestionId(Long questionId);}

i get this error:

exception=org.springframework.data.mapping.MappingException, message=Parameter org.springframework.data.mapping.PreferredConstructor$Parameter@42146ac0 does not have a name!, stackTrace=org.springframework.data.mapping.MappingException: Parameter org.springframework.data.mapping.PreferredConstructor$Parameter@42146ac0 does not have a name!

Do you have any idea where this comes from? does it have problems deserializing the maps?


Viewing all articles
Browse latest Browse all 2222

Trending Articles



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