springboot 中用Cassandra 工具类链接数据库时有没有办法动态指定keyspace

springboot 中用Cassandra 工具类链接数据库的时候,有没有办法动态指定keyspace呀?

展开
收起
aoxunb4t7tn3w 2022-04-24 14:07:42 717 分享 版权
1 条回答
写回答
取消 提交回答
  • 写个配置就好了 org.springframework.data.cassandra.config.java.AbstractCassandraConfiguration#getKeyspaceName,每个keyspace继承下这个类就好了,在做个bean做下autowired

    2022-04-24 15:02:02
    赞同 展开评论