메서드 | 설명 |
---|---|
opsForValue | Strings를 쉽게 Serialize / Deserialize 해주는 Interface |
opsForList | List를 쉽게 Serialize / Deserialize 해주는 Interface |
opsForSet | Set를 쉽게 Serialize / Deserialize 해주는 Interface |
opsForZSet | ZSet를 쉽게 Serialize / Deserialize 해주는 Interface |
opsForHash | Hash를 쉽게 Serialize / Deserialize 해주는 Interface |
@Getter
@RedisHash("people")
public class Person {
@Id
String id;
String firstname;
String lastname;
Address address;
@Builder
public Person(String id, String firstname, String lastname, Address address) {
this.id = id;
this.firstname = firstname;
this.lastname = lastname;
this.address = address;
}
}
public interface PersonRedisRepository extends CrudRepository<Person, String> {
}
출처