В моем приложении я использую как Mongo, так и Aerospik > ошибка < /strong> < /p>
Приложение не удалось начать < /p>
Описание: < /p>
Параметр 1 конструктора в org.springframework.data.Aerospik .aerospike.convert.customConversions: определено в null
- customcongressions: определено методом «CustomConversions» в ресурсе пути класса [com/spring/rule/ingine/config/rouelgineconfig.class]
- mongocustomcongersions: defined по методу «MongocustomCongersions» в ресурсе пути класса [org/springframework/boot/autoconfigure/data/mongo/mongodataconfiguration.class]
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.aerospike.cache.AerospikeCacheManager;
import org.springframework.data.aerospike.convert.AerospikeTypeAliasAccessor;
import org.springframework.data.aerospike.convert.MappingAerospikeConverter;
import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
import org.springframework.data.mapping.model.SimpleTypeHolder;
import com.aerospike.client.AerospikeClient;
@EnableAutoConfiguration
@Configuration
@Import(value = {MappingAerospikeConverter.class, AerospikeMappingContext.class, AerospikeTypeAliasAccessor.class,
SimpleTypeHolder.class})
public class AerospikeConfig {
@Value("${fs.aerospike.hostName}")
private String hostName;
@Value("${fs.aerospike.portNumber}")
private int port;
@Autowired
private MappingAerospikeConverter mappingAerospikeConverter;
@Bean
public AerospikeClient aerospike() {
return new AerospikeClient(hostName, port);
}
@Bean
public AerospikeCacheManager cacheManager(AerospikeClient aerospikeClient) {
return new AerospikeCacheManager(aerospikeClient, mappingAerospikeConverter);
}
}
Подробнее здесь: https://stackoverflow.com/questions/737 ... onflicting