我将如何重写AbstractCassandraConfiguration以使用我自己的函数来创建模式。我希望能够使用我在运行时选择的cql脚本来设置Cassandra实例。
当CassandraSessionFactoryBean.performSchemaAction()在AbstractCassandraConfiguration.session()中创建时,我尝试过重写它。这将导致cqllib与
java.lang.IllegalArgumentException: Superclass has no null constructors but no arguments were given这似乎与cqlib创建代理的方式有关:Superclass has no null constructors but no arguments were given
发布于 2014-12-02 21:37:34
您可以在getStartupScripts()中重写AbstractCassandraConfiguration。在那里,你可以做任何你想做的事。它由CassandraCqlClusterFactoryBean的executeSpecsAndScripts方法(在afterPropertiesSet中被调用)使用。
https://stackoverflow.com/questions/27257721
复制相似问题