Örnek
Şu satırı dahil ederiz
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-cassandra</artifactId> </dependency>
Örnek - reactive
Şu satırı dahil ederiz
application.yml<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-cassandra-reactive</artifactId><version>2.0.0.M7</version></dependency>
Örnek
Şöyle yaparız
cassandra:personalization:cluster-name: personalizationcontact-points: 172.X.X.X, 172.X.X.Ykeyspace-name: personalization
Birden Fazla Cassandra Keyspace Kullanmak
Burada bir örnek var
ReactiveCassandraRepository Arayüzü
Şöyle yaparız
@Repositorypublic interface UserPreferencesRepository extendsReactiveCassandraRepository<UserPreferences, UserId> {@Query(value = “SELECT * FROM user_preferences where user_id = ?0 limit ?1”)Flux<UserPreferences> findByUserId(int userId, int limit);}
Hiç yorum yok:
Yorum Gönder