aerospike-community / spring-data-aerospike-starters

spring-data-aerospike-starters
https://github.com/aerospike-community/spring-data-aerospike
15 stars 7 forks source link

Failed circular dependencies validation in SB 2.6+ #108

Closed mrozk closed 2 years ago

mrozk commented 2 years ago

During the startup on SB 2.6+, the validation error is thrown

The dependencies of some of the beans in the application context form a cycle:

counterOperations defined in com.playtika.services.bundles.persistence.configuration.AutoIncrementCounterConfiguration ↓ aerospikeTemplate defined in class path resource [org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataConfiguration.class] ↓ mappingAerospikeConverter defined in class path resource [org/springframework/boot/autoconfigure/data/aerospike/AerospikeCommonDataConfiguration.class] ┌─────┐ | aerospikeMappingContext defined in class path resource [org/springframework/boot/autoconfigure/data/aerospike/AerospikeCommonDataConfiguration.class] ↑ ↓ | aerospikePersistenceEntityIndexCreator defined in class path resource [org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataConfiguration.class] └─────┘

In order to fix the validation error, we need to pass the parameter

spring.main.allow-circular-references=true

Aloren commented 2 years ago

relates to https://github.com/spring-projects/spring-data-commons/issues/2587

Aloren commented 2 years ago

Fix will be available in the next release version.

mrozk commented 2 years ago

Thanks, Anastasiia