#553 - Adapt Spring Data Cassandra.

This commit is contained in:
Mark Paluch
2020-02-10 15:28:29 +01:00
parent c88ad331c0
commit 523d2c8a56
18 changed files with 72 additions and 97 deletions

View File

@@ -28,7 +28,7 @@ import org.springframework.core.convert.converter.Converter;
import org.springframework.data.cassandra.core.convert.CassandraCustomConversions;
import org.springframework.util.StringUtils;
import com.datastax.driver.core.Row;
import com.datastax.oss.driver.api.core.cql.Row;
import com.fasterxml.jackson.databind.ObjectMapper;
/**

View File

@@ -23,8 +23,7 @@ import org.springframework.data.annotation.Id;
import org.springframework.data.cassandra.core.mapping.CassandraType;
import org.springframework.data.cassandra.core.mapping.Table;
import com.datastax.driver.core.DataType.Name;
import com.datastax.driver.core.UDTValue;
import com.datastax.oss.driver.api.core.data.UdtValue;
/**
* @author Mark Paluch
@@ -39,6 +38,5 @@ public class Person {
Address current;
List<Address> previous;
@CassandraType(type = Name.UDT, userTypeName = "address")
UDTValue alternative;
@CassandraType(type = CassandraType.Name.UDT, userTypeName = "address") UdtValue alternative;
}

View File

@@ -1,2 +1,3 @@
spring.data.cassandra.keyspace-name=example
spring.data.cassandra.schema-action=recreate
spring.data.cassandra.local-datacenter=datacenter1