如何重写AbstractCassandraConfiguration
以使用我自己的函数来创建架构。我希望能够使用我在运行时选择的cql脚本来设置Cassandra实例。
我在CassandraSessionFactoryBean.performSchemaAction()
创建AbstractCassandraConfiguration.session()
时尝试覆盖java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given
。这会导致cqllib失败并显示
{{1}}
这似乎与cqlib如何创建代理有关:Superclass has no null constructors but no arguments were given
答案 0 :(得分:1)
您可以在getStartupScripts()
中覆盖AbstractCassandraConfiguration
。在那里,你可以做任何你想做的事。它由CassandraCqlClusterFactoryBean
的{{1}}方法(在executeSpecsAndScripts
中调用)使用。