【发布时间】:2018-03-17 23:53:57
【问题描述】:
不确定2.0 版本是否有任何变化,但是当使用 Spring Data Cassandra 2.0.5 时,此代码将不再在 Spring Boot 测试中工作:
@Autowired
CqlTemplate cqlTemplate;
这是在教程中介绍的,如何让CqlOperations(接口CqlTemplate 实现)读取Javadoc 或Reference doc 并不是很简单。
在SpringBootTest 中使用该注释会导致:
UnsatisfiedDependencyException: Error creating bean with name
'com.alertavert.api.TriggerRestControllerTest': Unsatisfied
dependency expressed through field 'cqlTemplate';
【问题讨论】:
标签: java spring spring-boot cassandra integration-testing