# spring-boot-cassandra
A simple example with Springboot and Cassandra
A simple example explaining the spring boot cassandra implementation
It has two implementations - auto configuration and using AbstractCassandraConfiguration.
Exmaple walks through a GET and POST request
Also it explains how to have new TYPE in a cassandra table
Create a table
CREATE TABLE location ( vehicle_id text, date text, time timestamp, latitude double, longitude double, PRIMARY KEY ((vehicle_id, date), time) ) WITH CLUSTERING ORDER BY (time DESC);
Create a type address for the above table,
CREATE TYPE address ( street text, city text, zip_code int, phone text);
Alter table to add the new type as a column,
alter table location add address frozen\<address\>;
没有合适的资源?快使用搜索试试~ 我知道了~
spring-boot-cassandra:一个使用Springboot和Cassandra的简单示例
共13个文件
java:7个
yml:1个
cmd:1个
需积分: 41 9 下载量 176 浏览量
2021-04-27
22:43:50
上传
评论
收藏 13KB ZIP 举报
温馨提示
春天引导卡桑德拉 一个使用Springboot和Cassandra的简单示例 一个简单的示例,说明spring boot cassandra的实现 它有两个实现-自动配置和使用AbstractCassandraConfiguration。 Exmaple遍历GET和POST请求 还说明了如何在cassandra表中使用新的TYPE 建立表格 使用聚类排序依据(时间DESC)创建表位置(车辆ID文本,日期文本,时间时间戳,纬度双精度,经度双精度,主键((vehicle_id,日期),时间)); 为上表创建一个类型地址, CREATE TYPE地址(街道文本,城市文本,邮政编码int,电话文本); 修改表以将新类型添加为列, 更改表位置添加地址Frozen <地址>;
资源详情
资源评论
资源推荐
收起资源包目录
spring-boot-cassandra-master.zip (13个子文件)
spring-boot-cassandra-master
src
main
resources
application.yml 137B
java
com
springboot
SpringBootCassandraApplication.java 332B
Address.java 836B
CassandraConfig.java 1KB
Location.java 1KB
CassandraRepository.java 373B
CassandraController.java 1KB
test
java
com
springboot
SpringBootCassandraApplicationTests.java 344B
mvnw 6KB
LICENSE 1KB
pom.xml 2KB
mvnw.cmd 5KB
README.md 754B
共 13 条
- 1
徐志鹄
- 粉丝: 16
- 资源: 4661
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0