I am using spring-data-aerospike dependency within my spring boot app to interact with Aerospike db. I ran into the follow error while using findAll() method of AerospikeRepository (which is synonymous to the findAll() method provided by CrudRepository).
java.lang.IllegalStateException: Query without a filter will initiate a scan. Since scans are potentially dangerous operations, they are disabled by default in spring-data-aerospike. If you still need to use them, enable them via scansEnabled
property in org.springframework.data.aerospike.config.AerospikeDataSettings
.
Any leads or pointers is greatly appreciated.
Leaving the answer for anyone who runs into the same issue.
Here is what I did to resolve the issue.
Referenced the code in
org.springframework.data.aerospike.config.AerospikeDataSettings
and overrode the bean in my applications Aerospike config class