org.springframework.cloud
spring-cloud-test-support
diff --git a/spring-boot-autoconfigure-data-aerospike/pom.xml b/spring-boot-autoconfigure-aerospike-common/pom.xml
similarity index 70%
rename from spring-boot-autoconfigure-data-aerospike/pom.xml
rename to spring-boot-autoconfigure-aerospike-common/pom.xml
index d15d712..c115de0 100644
--- a/spring-boot-autoconfigure-data-aerospike/pom.xml
+++ b/spring-boot-autoconfigure-aerospike-common/pom.xml
@@ -9,41 +9,25 @@
${revision}
- Spring Data Aerospike Starters: spring-boot-autoconfigure-data-aerospike
- spring-boot-autoconfigure-data-aerospike
+ Spring Data Aerospike Starters: spring-boot-autoconfigure-aerospike-common
+ spring-boot-autoconfigure-aerospike-common
Auto configuration for using Spring Data Aerospike
-
org.projectlombok
lombok
provided
-
-
- com.aerospike
- spring-data-aerospike
- true
-
-
org.springframework.boot
spring-boot-autoconfigure
-
-
- com.aerospike
- aerospike-client
- true
-
-
com.aerospike
- aerospike-reactor-client
+ spring-data-aerospike
true
-
org.springframework.boot
spring-boot-autoconfigure-processor
@@ -54,11 +38,30 @@
spring-boot-configuration-processor
true
-
org.springframework.boot
spring-boot-starter-test
test
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ 3.1.3
+
+
+
+ deploy
+
+
+ false
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java
new file mode 100644
index 0000000..6a36fb2
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.boot.autoconfigure.aerospike;
+
+import com.aerospike.client.IAerospikeClient;
+import com.aerospike.client.policy.ClientPolicy;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.ValidateHostsProperty;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+
+import static org.springframework.boot.autoconfigure.util.AerospikeConfigurationUtils.getClientPolicyConfig;
+
+/**
+ * {@link EnableAutoConfiguration Auto-configuration} for Aerospike client.
+ *
+ * @author Anastasiia Smirnova
+ */
+@AutoConfiguration
+@ConditionalOnClass(IAerospikeClient.class)
+@Conditional(ValidateHostsProperty.class)
+@EnableConfigurationProperties(AerospikeProperties.class)
+public class AerospikeAutoConfiguration {
+
+ @Bean
+ @ConditionalOnMissingBean
+ public ClientPolicy aerospikeClientPolicy(AerospikeProperties properties) {
+ return getClientPolicyConfig(new ClientPolicy(), properties);
+ }
+}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java
similarity index 96%
rename from spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java
rename to spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java
index 620f4ab..b032b49 100644
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeProperties.java
@@ -19,10 +19,11 @@
import com.aerospike.client.policy.AuthMode;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.data.aerospike.config.AerospikeDataSettings;
import java.time.Duration;
+import static org.springframework.data.aerospike.config.AerospikeDataConfigurationSupport.CONFIG_PREFIX_CONNECTION;
+
/**
* Basic configuration properties for Aerospike client.
* For more details on each option see corresponding field documentation in {@link com.aerospike.client.policy.ClientPolicy}.
@@ -30,7 +31,7 @@
* @author Anastasiia Smirnova
*/
@Data
-@ConfigurationProperties(prefix = "spring.aerospike")
+@ConfigurationProperties(prefix = CONFIG_PREFIX_CONNECTION)
public class AerospikeProperties {
/**
@@ -157,7 +158,7 @@ public abstract static class PolicyDefault {
public Duration sleepBetweenRetries;
/**
- * If the key is sent on a write, the key will be stored with the record on the server.
+ * If the key is sent in a write operation, it will be stored with the record on the server.
*/
public Boolean sendKey;
}
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsClientOnly.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsClientOnly.java
new file mode 100644
index 0000000..2d155ce
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsClientOnly.java
@@ -0,0 +1,20 @@
+package org.springframework.boot.autoconfigure.condition;
+
+import org.springframework.context.annotation.Condition;
+import org.springframework.context.annotation.ConditionContext;
+import org.springframework.core.type.AnnotatedTypeMetadata;
+
+import static org.springframework.data.aerospike.config.AerospikeDataConfigurationSupport.CONFIG_PREFIX_DATA;
+
+public class IsClientOnly implements Condition {
+
+ @Override
+ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
+ String strIsClientOnly = context.getEnvironment().getProperty("starters.aerospike.client-only");
+ String namespace = context.getEnvironment().getProperty(CONFIG_PREFIX_DATA + ".namespace");
+ boolean isClientOnly = strIsClientOnly != null && strIsClientOnly.equalsIgnoreCase("true");
+ boolean hasNamespace = namespace != null && !namespace.isEmpty();
+ // if the explicit client-only property is true, no need to check for namespace
+ return isClientOnly || !hasNamespace;
+ }
+}
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsNotClientOnly.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsNotClientOnly.java
new file mode 100644
index 0000000..db959d7
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/IsNotClientOnly.java
@@ -0,0 +1,22 @@
+package org.springframework.boot.autoconfigure.condition;
+
+import org.springframework.context.annotation.Condition;
+import org.springframework.context.annotation.ConditionContext;
+import org.springframework.core.type.AnnotatedTypeMetadata;
+
+import static org.springframework.data.aerospike.config.AerospikeDataConfigurationSupport.CONFIG_PREFIX_DATA;
+
+public class IsNotClientOnly implements Condition {
+
+ @Override
+ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
+ String strIsClientOnly = context.getEnvironment().getProperty("starters.aerospike.client-only");
+ String namespace = context.getEnvironment().getProperty(CONFIG_PREFIX_DATA + ".namespace");
+ boolean isClientOnly = strIsClientOnly != null
+ && !strIsClientOnly.isEmpty()
+ && Boolean.getBoolean(strIsClientOnly);
+ boolean hasNamespace = namespace != null && !namespace.isEmpty();
+ // if the explicit client-only property is true, no need to check for namespace
+ return !isClientOnly && hasNamespace;
+ }
+}
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/ValidateHostsProperty.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/ValidateHostsProperty.java
new file mode 100644
index 0000000..6092e68
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/condition/ValidateHostsProperty.java
@@ -0,0 +1,24 @@
+package org.springframework.boot.autoconfigure.condition;
+
+import org.springframework.context.annotation.Condition;
+import org.springframework.context.annotation.ConditionContext;
+import org.springframework.core.type.AnnotatedTypeMetadata;
+
+import java.security.InvalidParameterException;
+
+import static org.springframework.data.aerospike.config.AerospikeDataConfigurationSupport.CONFIG_PREFIX_CONNECTION;
+
+public class ValidateHostsProperty implements Condition {
+
+ @Override
+ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
+ String hostsProperty = CONFIG_PREFIX_CONNECTION + ".hosts";
+ String hosts = context.getEnvironment().getProperty(hostsProperty);
+ boolean hasHosts = hosts != null && !hosts.isEmpty();
+
+ if (!hasHosts) {
+ throw new InvalidParameterException("Required property '" + hostsProperty + "' is missing");
+ }
+ return true;
+ }
+}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java
similarity index 94%
rename from spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java
rename to spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java
index a1974f0..7564e2d 100644
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataProperties.java
@@ -19,7 +19,6 @@
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.data.aerospike.config.AerospikeDataSettings;
/**
* Configuration properties for Spring Data Aerospike.
@@ -38,12 +37,12 @@ public class AerospikeDataProperties {
private String namespace;
/**
- * Bin name that will be used for storing entity's type.
+ * Bin name that will be used for storing entity's type. Default value is null
*
*
* @see org.springframework.data.aerospike.convert.AerospikeTypeAliasAccessor
*/
- private String typeKey = "@_class";
+ private String classKey = "@_class";
/**
* Gives ability to disable queries that will run scan on Aerospike server.
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/util/AerospikeConfigurationUtils.java
similarity index 53%
rename from spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java
rename to spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/util/AerospikeConfigurationUtils.java
index 969d4c1..72d6357 100644
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/aerospike/AerospikeAutoConfiguration.java
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/java/org/springframework/boot/autoconfigure/util/AerospikeConfigurationUtils.java
@@ -1,65 +1,34 @@
-/*
- * Copyright 2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.aerospike;
-
-import com.aerospike.client.AerospikeClient;
+package org.springframework.boot.autoconfigure.util;
+
import com.aerospike.client.Host;
-import com.aerospike.client.IAerospikeClient;
-import com.aerospike.client.async.EventLoops;
-import com.aerospike.client.async.NioEventLoops;
-import com.aerospike.client.policy.*;
-import com.aerospike.client.reactor.AerospikeReactorClient;
-import com.aerospike.client.reactor.IAerospikeReactorClient;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import reactor.core.publisher.Flux;
-
-import java.util.Optional;
+import com.aerospike.client.policy.BatchDeletePolicy;
+import com.aerospike.client.policy.BatchPolicy;
+import com.aerospike.client.policy.BatchUDFPolicy;
+import com.aerospike.client.policy.BatchWritePolicy;
+import com.aerospike.client.policy.ClientPolicy;
+import com.aerospike.client.policy.Policy;
+import com.aerospike.client.policy.QueryPolicy;
+import com.aerospike.client.policy.WritePolicy;
+import org.springframework.boot.autoconfigure.aerospike.AerospikeProperties;
+import org.springframework.boot.autoconfigure.data.aerospike.AerospikeDataProperties;
+import org.springframework.data.aerospike.config.AerospikeDataSettings;
+
+import java.util.Arrays;
+import java.util.Collection;
import java.util.function.Consumer;
-/**
- * {@link EnableAutoConfiguration Auto-configuration} for Aerospike client.
- *
- * @author Anastasiia Smirnova
- */
-@AutoConfiguration
-@ConditionalOnClass(IAerospikeClient.class)
-@ConditionalOnProperty("spring.aerospike.hosts")
-@EnableConfigurationProperties(AerospikeProperties.class)
-public class AerospikeAutoConfiguration {
-
- @Bean(name = "aerospikeClient", destroyMethod = "close")
- @ConditionalOnMissingBean(IAerospikeClient.class)
- public IAerospikeClient aerospikeClient(AerospikeProperties properties,
- ClientPolicy aerospikeClientPolicy) {
- Host[] hosts = Host.parseHosts(properties.getHosts(), properties.getDefaultPort());
- return new AerospikeClient(aerospikeClientPolicy, hosts);
+public class AerospikeConfigurationUtils {
+
+ public static Collection getClientHosts(AerospikeProperties properties) {
+ if (properties.getHosts() != null) {
+ Host[] hosts = Host.parseHosts(properties.getHosts(), properties.getDefaultPort());
+ return Arrays.stream(hosts).toList();
+ } else {
+ return null;
+ }
}
- @Bean(name = "aerospikeClientPolicy")
- @ConditionalOnMissingBean
- public ClientPolicy aerospikeClientPolicy(AerospikeProperties properties,
- Optional aerospikeEventLoops) {
- ClientPolicy clientPolicy = new ClientPolicy();
+ public static ClientPolicy getClientPolicyConfig(ClientPolicy clientPolicy, AerospikeProperties properties) {
whenPresent(properties.getUser(), p -> clientPolicy.user = p);
whenPresent(properties.getPassword(), p -> clientPolicy.password = p);
whenPresent(properties.getClusterName(), p -> clientPolicy.clusterName = p);
@@ -80,30 +49,10 @@ public ClientPolicy aerospikeClientPolicy(AerospikeProperties properties,
clientPolicy.batchWritePolicyDefault = setupBatchWritePolicy(properties);
clientPolicy.batchDeletePolicyDefault = setupBatchDeletePolicy(properties);
clientPolicy.batchUDFPolicyDefault = setupBatchUDFPolicy(properties);
- aerospikeEventLoops.ifPresent(loops -> clientPolicy.eventLoops = loops);
-
return clientPolicy;
}
- @ConditionalOnClass({IAerospikeReactorClient.class, Flux.class})
- public static class AerospikeReactiveAutoConfiguration {
-
- @Bean(name = "aerospikeReactorClient", destroyMethod = "")
- @ConditionalOnMissingBean
- //disable destroy method, because we do not want AerospikeReactorClient to close AerospikeClient
- public IAerospikeReactorClient aerospikeReactorClient(IAerospikeClient aerospikeClient,
- EventLoops eventLoops) {
- return new AerospikeReactorClient(aerospikeClient, eventLoops);
- }
-
- @Bean(name = "aerospikeEventLoops", destroyMethod = "close")
- @ConditionalOnMissingBean
- public EventLoops aerospikeEventLoops() {
- return new NioEventLoops();
- }
- }
-
- private WritePolicy setupWritePolicy(AerospikeProperties properties) {
+ private static WritePolicy setupWritePolicy(AerospikeProperties properties) {
AerospikeProperties.WritePolicyDefault writePolicyDefault = properties.getWrite();
WritePolicy policy = new WritePolicy();
setGeneralPolicyProperties(policy, writePolicyDefault);
@@ -111,14 +60,14 @@ private WritePolicy setupWritePolicy(AerospikeProperties properties) {
return policy;
}
- private Policy setupReadPolicy(AerospikeProperties properties) {
+ private static Policy setupReadPolicy(AerospikeProperties properties) {
AerospikeProperties.ReadPolicyDefault readPolicyDefault = properties.getRead();
Policy policy = new Policy();
setGeneralPolicyProperties(policy, readPolicyDefault);
return policy;
}
- private BatchPolicy setupBatchPolicy(AerospikeProperties properties) {
+ private static BatchPolicy setupBatchPolicy(AerospikeProperties properties) {
AerospikeProperties.BatchPolicyDefault batchPolicyDefault = properties.getBatch();
BatchPolicy policy = new BatchPolicy();
setGeneralPolicyProperties(policy, batchPolicyDefault);
@@ -128,28 +77,28 @@ private BatchPolicy setupBatchPolicy(AerospikeProperties properties) {
return policy;
}
- private BatchWritePolicy setupBatchWritePolicy(AerospikeProperties properties) {
+ private static BatchWritePolicy setupBatchWritePolicy(AerospikeProperties properties) {
AerospikeProperties.BatchWritePolicyDefault batchWritePolicyDefault = properties.getBatchWrite();
BatchWritePolicy policy = new BatchWritePolicy();
whenPresent(batchWritePolicyDefault.durableDelete, p -> policy.durableDelete = p);
return policy;
}
- private BatchDeletePolicy setupBatchDeletePolicy(AerospikeProperties properties) {
+ private static BatchDeletePolicy setupBatchDeletePolicy(AerospikeProperties properties) {
AerospikeProperties.BatchDeletePolicyDefault batchDeletePolicyDefault = properties.getBatchDelete();
BatchDeletePolicy policy = new BatchDeletePolicy();
whenPresent(batchDeletePolicyDefault.durableDelete, p -> policy.durableDelete = p);
return policy;
}
- private BatchUDFPolicy setupBatchUDFPolicy(AerospikeProperties properties) {
+ private static BatchUDFPolicy setupBatchUDFPolicy(AerospikeProperties properties) {
AerospikeProperties.BatchUDFPolicyDefault batchUDFPolicyDefault = properties.getBatchUdf();
BatchUDFPolicy policy = new BatchUDFPolicy();
whenPresent(batchUDFPolicyDefault.durableDelete, p -> policy.durableDelete = p);
return policy;
}
- private QueryPolicy setupQueryPolicy(AerospikeProperties properties) {
+ private static QueryPolicy setupQueryPolicy(AerospikeProperties properties) {
AerospikeProperties.QueryPolicyDefault queryPolicyDefault = properties.getQuery();
QueryPolicy policy = new QueryPolicy();
setGeneralPolicyProperties(policy, queryPolicyDefault);
@@ -161,7 +110,7 @@ private QueryPolicy setupQueryPolicy(AerospikeProperties properties) {
return policy;
}
- private void setGeneralPolicyProperties(Policy policy, AerospikeProperties.PolicyDefault policyDefault) {
+ private static void setGeneralPolicyProperties(Policy policy, AerospikeProperties.PolicyDefault policyDefault) {
whenPresent(policyDefault.socketTimeout, p -> policy.socketTimeout = (int) p.toMillis());
whenPresent(policyDefault.totalTimeout, p -> policy.totalTimeout = (int) p.toMillis());
whenPresent(policyDefault.timeoutDelay, p -> policy.timeoutDelay = (int) p.toMillis());
@@ -170,8 +119,27 @@ private void setGeneralPolicyProperties(Policy policy, AerospikeProperties.Polic
whenPresent(policyDefault.sendKey, p -> policy.sendKey = p);
}
- private void whenPresent(T param, Consumer consumer) {
+ private static void whenPresent(T param, Consumer consumer) {
if (param != null)
consumer.accept(param);
}
+
+ public static String getNamespace(AerospikeDataProperties dataProperties) {
+ if (dataProperties.getNamespace() != null) {
+ return dataProperties.getNamespace();
+ } else {
+ return null;
+ }
+ }
+
+ public static void getDataSettings(AerospikeDataProperties dataProperties,
+ AerospikeDataSettings aerospikeDataSettings) {
+ whenPresent(dataProperties.isScansEnabled(), aerospikeDataSettings::setScansEnabled);
+ whenPresent(dataProperties.isCreateIndexesOnStartup(), aerospikeDataSettings::setCreateIndexesOnStartup);
+ whenPresent(dataProperties.getIndexCacheRefreshSeconds(), aerospikeDataSettings::setIndexCacheRefreshSeconds);
+ whenPresent(dataProperties.getServerVersionRefreshSeconds(), aerospikeDataSettings::setServerVersionRefreshSeconds);
+ whenPresent(dataProperties.getQueryMaxRecords(), aerospikeDataSettings::setQueryMaxRecords);
+ whenPresent(dataProperties.getBatchWriteSize(), aerospikeDataSettings::setBatchWriteSize);
+ whenPresent(dataProperties.isKeepOriginalKeyTypes(), aerospikeDataSettings::setKeepOriginalKeyTypes);
+ }
}
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring.factories b/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..67b9295
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.springframework.boot.autoconfigure.aerospike.AerospikeAutoConfiguration,\
diff --git a/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..caa37f6
--- /dev/null
+++ b/spring-boot-autoconfigure-aerospike-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+org.springframework.boot.autoconfigure.aerospike.AerospikeAutoConfiguration
diff --git a/spring-boot-autoconfigure-data-aerospike/src/test/resources/logback-test.xml b/spring-boot-autoconfigure-aerospike-common/src/test/resources/logback-test.xml
similarity index 100%
rename from spring-boot-autoconfigure-data-aerospike/src/test/resources/logback-test.xml
rename to spring-boot-autoconfigure-aerospike-common/src/test/resources/logback-test.xml
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeCommonDataConfiguration.java b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeCommonDataConfiguration.java
deleted file mode 100644
index a23bacf..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeCommonDataConfiguration.java
+++ /dev/null
@@ -1,150 +0,0 @@
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import com.aerospike.client.IAerospikeClient;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeanUtils;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.boot.autoconfigure.domain.EntityScanner;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.data.aerospike.config.AerospikeConnectionSettings;
-import org.springframework.data.aerospike.config.AerospikeDataSettings;
-import org.springframework.data.aerospike.config.AerospikeSettings;
-import org.springframework.data.aerospike.convert.AerospikeCustomConversions;
-import org.springframework.data.aerospike.convert.AerospikeTypeAliasAccessor;
-import org.springframework.data.aerospike.convert.MappingAerospikeConverter;
-import org.springframework.data.aerospike.core.AerospikeExceptionTranslator;
-import org.springframework.data.aerospike.core.DefaultAerospikeExceptionTranslator;
-import org.springframework.data.aerospike.index.AerospikeIndexResolver;
-import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
-import org.springframework.data.aerospike.mapping.Document;
-import org.springframework.data.aerospike.query.FilterExpressionsBuilder;
-import org.springframework.data.aerospike.query.StatementBuilder;
-import org.springframework.data.aerospike.query.cache.IndexesCache;
-import org.springframework.data.aerospike.query.cache.IndexesCacheHolder;
-import org.springframework.data.aerospike.server.version.ServerVersionSupport;
-import org.springframework.data.annotation.Persistent;
-import org.springframework.data.mapping.model.FieldNamingStrategy;
-
-import java.util.Collections;
-
-@Slf4j
-@AutoConfiguration
-class AerospikeCommonDataConfiguration {
-
- @Bean(name = "aerospikeServerVersionSupport")
- @ConditionalOnMissingBean(ServerVersionSupport.class)
- public ServerVersionSupport serverVersionSupport(IAerospikeClient aerospikeClient,
- AerospikeDataProperties properties) {
- ServerVersionSupport serverVersionSupport = new ServerVersionSupport(aerospikeClient);
- processServerVersionRefreshFrequency(properties.getServerVersionRefreshSeconds(), serverVersionSupport);
- return serverVersionSupport;
- }
-
- private void processServerVersionRefreshFrequency(int serverVersionRefreshSeconds,
- ServerVersionSupport serverVersionSupport) {
- if (serverVersionRefreshSeconds > 0) {
- serverVersionSupport.scheduleServerVersionRefresh(serverVersionRefreshSeconds);
- }
- }
-
- @Bean(name = "aerospikeFilterExpressionsBuilder")
- @ConditionalOnMissingBean(name = "aerospikeFilterExpressionsBuilder")
- public FilterExpressionsBuilder aerospikeFilterExpressionsBuilder() {
- return new FilterExpressionsBuilder();
- }
-
- @Bean(name = "aerospikeStatementBuilder")
- @ConditionalOnMissingBean(name = "aerospikeStatementBuilder")
- public StatementBuilder aerospikeStatementBuilder(IndexesCache indexesCache) {
- return new StatementBuilder(indexesCache);
- }
-
- @Bean(name = "aerospikeIndexResolver")
- @ConditionalOnMissingBean(name = "aerospikeIndexResolver")
- public AerospikeIndexResolver aerospikeIndexResolver() {
- return new AerospikeIndexResolver();
- }
-
- @Bean(name = "aerospikeIndexCache")
- @ConditionalOnMissingBean(name = "aerospikeIndexCache")
- public IndexesCacheHolder aerospikeIndexCache() {
- return new IndexesCacheHolder();
- }
-
- @Bean(name = "mappingAerospikeConverter")
- @ConditionalOnMissingBean(name = "mappingAerospikeConverter")
- public MappingAerospikeConverter mappingAerospikeConverter(AerospikeMappingContext aerospikeMappingContext,
- AerospikeTypeAliasAccessor aerospikeTypeAliasAccessor,
- AerospikeCustomConversions aerospikeCustomConversions,
- AerospikeDataProperties aerospikeDataProperties,
- AerospikeDataSettings dataSettings) {
- return new MappingAerospikeConverter(aerospikeMappingContext, aerospikeCustomConversions,
- aerospikeTypeAliasAccessor, aerospikeDataSettings(aerospikeDataProperties, dataSettings));
- }
-
- @Bean(name = "aerospikeTypeAliasAccessor")
- @ConditionalOnMissingBean(name = "aerospikeTypeAliasAccessor")
- public AerospikeTypeAliasAccessor aerospikeTypeAliasAccessor(AerospikeDataProperties aerospikeDataProperties) {
- String typeKey = aerospikeDataProperties.getTypeKey();
- return new AerospikeTypeAliasAccessor(typeKey != null && typeKey.equals("") ? null : typeKey);
- }
-
- @Bean(name = "aerospikeCustomConversions")
- @ConditionalOnMissingBean(name = "aerospikeCustomConversions")
- public AerospikeCustomConversions aerospikeCustomConversions() {
- return new AerospikeCustomConversions(Collections.emptyList());
- }
-
- @Bean(name = "aerospikeMappingContext")
- @ConditionalOnMissingBean(name = "aerospikeMappingContext")
- public AerospikeMappingContext aerospikeMappingContext(ApplicationContext applicationContext,
- AerospikeCustomConversions aerospikeCustomConversions,
- AerospikeDataProperties aerospikeDataProperties)
- throws Exception {
- AerospikeMappingContext context = new AerospikeMappingContext();
- context.setInitialEntitySet(new EntityScanner(applicationContext).scan(Document.class, Persistent.class));
- context.setSimpleTypeHolder(aerospikeCustomConversions.getSimpleTypeHolder());
- Class> fieldNamingStrategy = aerospikeDataProperties.getFieldNamingStrategy();
- if (fieldNamingStrategy != null) {
- context.setFieldNamingStrategy((FieldNamingStrategy) BeanUtils.instantiateClass(fieldNamingStrategy));
- }
- return context;
- }
-
- @Bean(name = "aerospikeExceptionTranslator")
- @ConditionalOnMissingBean(name = "aerospikeExceptionTranslator")
- public AerospikeExceptionTranslator aerospikeExceptionTranslator() {
- return new DefaultAerospikeExceptionTranslator();
- }
-
- @Bean
- public AerospikeDataSettings readAerospikeDataSettings() {
- return new AerospikeDataSettings();
- }
-
- @Bean
- public AerospikeConnectionSettings readAerospikeSettings() {
- return new AerospikeConnectionSettings();
- }
-
- @Bean
- public AerospikeSettings aerospikeSettings(AerospikeDataSettings dataSettings,
- AerospikeConnectionSettings connectionSettings) {
- return new AerospikeSettings(connectionSettings, dataSettings);
- }
-
- private AerospikeDataSettings aerospikeDataSettings(AerospikeDataProperties aerospikeDataProperties,
- AerospikeDataSettings dataSettings) {
- return configureDataSettings(dataSettings, aerospikeDataProperties);
- }
-
- private AerospikeDataSettings configureDataSettings(AerospikeDataSettings dataSettings,
- AerospikeDataProperties aerospikeDataProperties) {
- dataSettings.setScansEnabled(aerospikeDataProperties.isScansEnabled());
- dataSettings.setCreateIndexesOnStartup(aerospikeDataProperties.isCreateIndexesOnStartup());
- dataSettings.setWriteSortedMaps(aerospikeDataProperties.isWriteSortedMaps());
- return dataSettings;
- }
-}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataConfiguration.java b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataConfiguration.java
deleted file mode 100644
index 6e32cd1..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeDataConfiguration.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import com.aerospike.client.IAerospikeClient;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.ObjectProvider;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.data.aerospike.config.AerospikeDataSettings;
-import org.springframework.data.aerospike.config.AerospikeSettings;
-import org.springframework.data.aerospike.convert.MappingAerospikeConverter;
-import org.springframework.data.aerospike.core.AerospikeExceptionTranslator;
-import org.springframework.data.aerospike.core.AerospikeTemplate;
-import org.springframework.data.aerospike.index.AerospikeIndexResolver;
-import org.springframework.data.aerospike.index.AerospikePersistenceEntityIndexCreator;
-import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
-import org.springframework.data.aerospike.query.FilterExpressionsBuilder;
-import org.springframework.data.aerospike.query.QueryEngine;
-import org.springframework.data.aerospike.query.StatementBuilder;
-import org.springframework.data.aerospike.query.cache.IndexInfoParser;
-import org.springframework.data.aerospike.query.cache.IndexRefresher;
-import org.springframework.data.aerospike.query.cache.IndexesCacheUpdater;
-import org.springframework.data.aerospike.query.cache.InternalIndexOperations;
-import org.springframework.data.aerospike.server.version.ServerVersionSupport;
-
-/**
- * Configure Spring Data's Aerospike support.
- *
- * @author Igor Ermolenko
- * @author Anastasiia Smirnova
- */
-@Slf4j
-@AutoConfiguration
-class AerospikeDataConfiguration {
-
- @Bean(name = "aerospikeTemplate")
- @ConditionalOnMissingBean(name = "aerospikeTemplate")
- public AerospikeTemplate aerospikeTemplate(IAerospikeClient aerospikeClient,
- AerospikeDataProperties aerospikeDataProperties,
- MappingAerospikeConverter mappingAerospikeConverter,
- AerospikeMappingContext aerospikeMappingContext,
- AerospikeExceptionTranslator aerospikeExceptionTranslator,
- QueryEngine queryEngine, IndexRefresher indexRefresher,
- ServerVersionSupport serverVersionSupport) {
- return new AerospikeTemplate(aerospikeClient,
- aerospikeDataProperties.getNamespace(),
- mappingAerospikeConverter,
- aerospikeMappingContext,
- aerospikeExceptionTranslator, queryEngine, indexRefresher,
- serverVersionSupport);
- }
-
- @Bean(name = "aerospikeQueryEngine")
- @ConditionalOnMissingBean(name = "aerospikeQueryEngine")
- public QueryEngine aerospikeQueryEngine(IAerospikeClient aerospikeClient,
- AerospikeDataProperties aerospikeDataProperties,
- FilterExpressionsBuilder filterExpressionsBuilder,
- StatementBuilder statementBuilder, AerospikeSettings settings) {
- QueryEngine queryEngine = new QueryEngine(aerospikeClient, statementBuilder, filterExpressionsBuilder,
- settings.getDataSettings());
- queryEngine.setScansEnabled(aerospikeDataProperties.isScansEnabled());
- queryEngine.setQueryMaxRecords(aerospikeDataProperties.getQueryMaxRecords());
- return queryEngine;
- }
-
- @Bean(name = "aerospikeIndexRefresher")
- @ConditionalOnMissingBean(name = "aerospikeIndexRefresher")
- public IndexRefresher indexRefresher(IAerospikeClient aerospikeClient, IndexesCacheUpdater indexesCacheUpdater,
- ServerVersionSupport serverVersionSupport,
- AerospikeDataProperties aerospikeDataProperties,
- AerospikeDataSettings dataSettings) {
- IndexRefresher refresher = new IndexRefresher(aerospikeClient, aerospikeClient.getInfoPolicyDefault(),
- new InternalIndexOperations(new IndexInfoParser()), indexesCacheUpdater, serverVersionSupport);
- refresher.refreshIndexes();
- int refreshFrequency = aerospikeDataSettings(aerospikeDataProperties, dataSettings).getIndexCacheRefreshSeconds();
- processCacheRefreshFrequency(refreshFrequency, refresher);
- return refresher;
- }
-
- private void processCacheRefreshFrequency(int indexCacheRefreshSeconds, IndexRefresher indexRefresher) {
- if (indexCacheRefreshSeconds <= 0) {
- log.info("Periodic index cache refreshing is not scheduled, interval ({}) is <= 0",
- indexCacheRefreshSeconds);
- } else {
- indexRefresher.scheduleRefreshIndexes(indexCacheRefreshSeconds);
- }
- }
-
- @Bean
- @ConditionalOnMissingBean(name = "aerospikePersistenceEntityIndexCreator")
- public AerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCreator(
- AerospikeDataProperties aerospikeDataProperties,
- @Lazy ObjectProvider template,
- ObjectProvider aerospikeMappingContext,
- AerospikeIndexResolver aerospikeIndexResolver) {
- return new AerospikePersistenceEntityIndexCreator(aerospikeMappingContext,
- aerospikeDataProperties.isCreateIndexesOnStartup(), aerospikeIndexResolver, template);
- }
-
- private AerospikeDataSettings aerospikeDataSettings(AerospikeDataProperties aerospikeDataProperties,
- AerospikeDataSettings dataSettings) {
- return configureDataSettings(dataSettings, aerospikeDataProperties);
- }
-
- private AerospikeDataSettings configureDataSettings(AerospikeDataSettings dataSettings,
- AerospikeDataProperties aerospikeDataProperties) {
- dataSettings.setScansEnabled(aerospikeDataProperties.isScansEnabled());
- dataSettings.setCreateIndexesOnStartup(aerospikeDataProperties.isCreateIndexesOnStartup());
- dataSettings.setWriteSortedMaps(aerospikeDataProperties.isWriteSortedMaps());
- return dataSettings;
- }
-}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveDataConfiguration.java b/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveDataConfiguration.java
deleted file mode 100644
index 24872e6..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/main/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveDataConfiguration.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import com.aerospike.client.reactor.IAerospikeReactorClient;
-import org.springframework.beans.factory.ObjectProvider;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.data.aerospike.config.AerospikeSettings;
-import org.springframework.data.aerospike.convert.MappingAerospikeConverter;
-import org.springframework.data.aerospike.core.AerospikeExceptionTranslator;
-import org.springframework.data.aerospike.core.ReactiveAerospikeTemplate;
-import org.springframework.data.aerospike.index.AerospikeIndexResolver;
-import org.springframework.data.aerospike.index.ReactiveAerospikePersistenceEntityIndexCreator;
-import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
-import org.springframework.data.aerospike.query.FilterExpressionsBuilder;
-import org.springframework.data.aerospike.query.ReactorQueryEngine;
-import org.springframework.data.aerospike.query.StatementBuilder;
-import org.springframework.data.aerospike.query.cache.IndexInfoParser;
-import org.springframework.data.aerospike.query.cache.IndexesCacheUpdater;
-import org.springframework.data.aerospike.query.cache.InternalIndexOperations;
-import org.springframework.data.aerospike.query.cache.ReactorIndexRefresher;
-import org.springframework.data.aerospike.server.version.ServerVersionSupport;
-
-/**
- * Configure Spring Data's Reactive Aerospike support.
- *
- * @author Igor Ermolenko
- * @author Anastasiia Smirnova
- */
-@AutoConfiguration
-class AerospikeReactiveDataConfiguration {
-
- @Bean(name = "reactiveAerospikeTemplate")
- @ConditionalOnMissingBean(name = "reactiveAerospikeTemplate")
- public ReactiveAerospikeTemplate reactiveAerospikeTemplate(MappingAerospikeConverter mappingAerospikeConverter,
- AerospikeDataProperties aerospikeDataProperties,
- AerospikeMappingContext aerospikeMappingContext,
- AerospikeExceptionTranslator aerospikeExceptionTranslator,
- IAerospikeReactorClient aerospikeReactorClient,
- ReactorQueryEngine reactorQueryEngine,
- ReactorIndexRefresher reactorIndexRefresher,
- ServerVersionSupport serverVersionSupport) {
- return new ReactiveAerospikeTemplate(aerospikeReactorClient, aerospikeDataProperties.getNamespace(),
- mappingAerospikeConverter, aerospikeMappingContext,
- aerospikeExceptionTranslator, reactorQueryEngine, reactorIndexRefresher, serverVersionSupport);
- }
-
- @Bean(name = "reactiveAerospikeQueryEngine")
- @ConditionalOnMissingBean(name = "reactiveAerospikeQueryEngine")
- public ReactorQueryEngine reactiveAerospikeQueryEngine(IAerospikeReactorClient aerospikeReactorClient,
- AerospikeDataProperties aerospikeDataProperties,
- FilterExpressionsBuilder filterExpressionsBuilder,
- StatementBuilder statementBuilder,
- AerospikeSettings settings) {
- ReactorQueryEngine queryEngine = new ReactorQueryEngine(aerospikeReactorClient, statementBuilder,
- filterExpressionsBuilder, settings.getDataSettings());
- queryEngine.setScansEnabled(aerospikeDataProperties.isScansEnabled());
- queryEngine.setQueryMaxRecords(aerospikeDataProperties.getQueryMaxRecords());
- return queryEngine;
- }
-
- @Bean(name = "reactiveAerospikeIndexRefresher")
- @ConditionalOnMissingBean(name = "reactiveAerospikeIndexRefresher")
- public ReactorIndexRefresher reactiveAerospikeIndexRefresher(IAerospikeReactorClient aerospikeReactorClient,
- IndexesCacheUpdater indexesCacheUpdater,
- ServerVersionSupport serverVersionSupport) {
- ReactorIndexRefresher refresher = new ReactorIndexRefresher(aerospikeReactorClient, aerospikeReactorClient.getInfoPolicyDefault(),
- new InternalIndexOperations(new IndexInfoParser()), indexesCacheUpdater, serverVersionSupport);
- refresher.refreshIndexes().block();
- return refresher;
- }
-
- @Bean
- @ConditionalOnMissingBean(name = "reactiveAerospikePersistenceEntityIndexCreator")
- public ReactiveAerospikePersistenceEntityIndexCreator reactiveAerospikePersistenceEntityIndexCreator(
- AerospikeDataProperties aerospikeDataProperties,
- @Lazy ObjectProvider template,
- ObjectProvider aerospikeMappingContext,
- AerospikeIndexResolver aerospikeIndexResolver) {
- return new ReactiveAerospikePersistenceEntityIndexCreator(aerospikeMappingContext,
- aerospikeDataProperties.isCreateIndexesOnStartup(),
- aerospikeIndexResolver,
- template);
- }
-}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring.factories b/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring.factories
deleted file mode 100644
index e6b1e96..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring.factories
+++ /dev/null
@@ -1,7 +0,0 @@
-# Auto Configure
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.springframework.boot.autoconfigure.aerospike.AerospikeAutoConfiguration,\
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeDataAutoConfiguration,\
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeRepositoriesAutoConfiguration,\
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeReactiveDataAutoConfiguration,\
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeReactiveRepositoriesAutoConfiguration
diff --git a/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
deleted file mode 100644
index 31a3618..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
+++ /dev/null
@@ -1,5 +0,0 @@
-org.springframework.boot.autoconfigure.aerospike.AerospikeAutoConfiguration
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeDataAutoConfiguration
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeRepositoriesAutoConfiguration
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeReactiveDataAutoConfiguration
-org.springframework.boot.autoconfigure.data.aerospike.AerospikeReactiveRepositoriesAutoConfiguration
diff --git a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveRepositoriesAutoConfigurationTest.java b/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveRepositoriesAutoConfigurationTest.java
deleted file mode 100644
index c8b037f..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeReactiveRepositoriesAutoConfigurationTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import org.junit.jupiter.api.Test;
-import org.mockito.Mockito;
-import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
-import org.springframework.boot.autoconfigure.data.aerospike.city.City;
-import org.springframework.boot.autoconfigure.data.aerospike.city.CityRepository;
-import org.springframework.boot.autoconfigure.data.aerospike.city.ReactiveCityRepository;
-import org.springframework.boot.autoconfigure.data.aerospike.empty.EmptyDataPackage;
-import org.springframework.boot.test.context.runner.ApplicationContextRunner;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.aerospike.core.ReactiveAerospikeTemplate;
-import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
-import org.springframework.data.mapping.context.MappingContext;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-/**
- * Tests for {@link AerospikeReactiveRepositoriesAutoConfiguration}.
- *
- * @author Igor Ermolenko
- */
-public class AerospikeReactiveRepositoriesAutoConfigurationTest {
- private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
- .withConfiguration(AutoConfigurations.of(AerospikeReactiveRepositoriesAutoConfiguration.class, MockConfiguration.class));
-
- @Test
- public void reactiveRepositoryIsCreated() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .run(context -> {
- assertThat(context).hasSingleBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedWhenRepositoryInterfaceNotExists() {
- contextRunner
- .withUserConfiguration(NoRepositoryConfiguration.class)
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedForTypeImperative() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .withPropertyValues("spring.data.aerospike.repositories.type=imperative")
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedForTypeNone() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .withPropertyValues("spring.data.aerospike.repositories.type=none")
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
-
- @Configuration
- @TestAutoConfigurationPackage(City.class)
- static class DefaultConfiguration {
- }
-
- @Configuration
- @TestAutoConfigurationPackage(EmptyDataPackage.class)
- static class NoRepositoryConfiguration {
- }
-
- @Configuration
- static class MockConfiguration {
-
- @Bean
- public ReactiveAerospikeTemplate reactiveAerospikeTemplate() {
- AerospikeMappingContext context = new AerospikeMappingContext();
- ReactiveAerospikeTemplate mock = Mockito.mock(ReactiveAerospikeTemplate.class);
- when(mock.getMappingContext()).thenReturn((MappingContext) context);
- return mock;
- }
-
-
- @Bean
- public MappingContext aerospikeMappingContext() {
- return mock(MappingContext.class);
- }
- }
-
-}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeRepositoriesAutoConfigurationTest.java b/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeRepositoriesAutoConfigurationTest.java
deleted file mode 100644
index 78e50b9..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeRepositoriesAutoConfigurationTest.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2019 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.autoconfigure.AutoConfigurations;
-import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
-import org.springframework.boot.autoconfigure.data.aerospike.city.City;
-import org.springframework.boot.autoconfigure.data.aerospike.city.CityRepository;
-import org.springframework.boot.autoconfigure.data.aerospike.city.ReactiveCityRepository;
-import org.springframework.boot.autoconfigure.data.aerospike.empty.EmptyDataPackage;
-import org.springframework.boot.test.context.runner.ApplicationContextRunner;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.aerospike.core.AerospikeTemplate;
-import org.springframework.data.aerospike.mapping.AerospikeMappingContext;
-import org.springframework.data.mapping.context.MappingContext;
-
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-/**
- * Tests for {@link AerospikeRepositoriesAutoConfiguration}.
- *
- * @author Igor Ermolenko
- */
-public class AerospikeRepositoriesAutoConfigurationTest {
- private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
- .withConfiguration(AutoConfigurations.of(AerospikeRepositoriesAutoConfiguration.class, MockConfiguration.class));
-
- @Test
- public void repositoryIsCreated() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).hasSingleBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedWhenRepositoryInterfaceDoesNotExists() {
- contextRunner
- .withUserConfiguration(NoRepositoryConfiguration.class)
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedForTypeReactive() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .withPropertyValues("spring.data.aerospike.repositories.type=reactive")
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
- @Test
- public void repositoryIsNotCreatedForTypeNone() {
- contextRunner
- .withUserConfiguration(DefaultConfiguration.class)
- .withPropertyValues("spring.data.aerospike.repositories.type=none")
- .run(context -> {
- assertThat(context).doesNotHaveBean(ReactiveCityRepository.class);
- assertThat(context).doesNotHaveBean(CityRepository.class);
- });
- }
-
-
- @Configuration
- @TestAutoConfigurationPackage(City.class)
- static class DefaultConfiguration {
- }
-
- @Configuration
- @TestAutoConfigurationPackage(EmptyDataPackage.class)
- static class NoRepositoryConfiguration {
- }
-
- @Configuration
- static class MockConfiguration {
- @Bean
- public AerospikeTemplate aerospikeTemplate() {
- AerospikeMappingContext context = new AerospikeMappingContext();
- AerospikeTemplate mock = mock(AerospikeTemplate.class);
- when(mock.getMappingContext()).thenReturn((MappingContext) context);
- return mock;
- }
-
- @Bean
- public MappingContext aerospikeMappingContext() {
- return mock(MappingContext.class);
- }
- }
-
-}
diff --git a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeTestConfigurations.java b/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeTestConfigurations.java
deleted file mode 100644
index f771852..0000000
--- a/spring-boot-autoconfigure-data-aerospike/src/test/java/org/springframework/boot/autoconfigure/data/aerospike/AerospikeTestConfigurations.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.springframework.boot.autoconfigure.data.aerospike;
-
-import com.aerospike.client.IAerospikeClient;
-import com.aerospike.client.cluster.Node;
-import com.aerospike.client.policy.WritePolicy;
-import org.springframework.boot.autoconfigure.AutoConfiguration;
-import org.springframework.boot.autoconfigure.data.aerospike.city.City;
-import org.springframework.boot.autoconfigure.domain.EntityScan;
-import org.springframework.context.annotation.Bean;
-import org.springframework.core.convert.converter.Converter;
-import org.springframework.data.aerospike.convert.AerospikeCustomConversions;
-import org.springframework.data.aerospike.query.cache.ReactorIndexRefresher;
-import org.springframework.data.aerospike.server.version.ServerVersionSupport;
-
-import java.util.List;
-
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class AerospikeTestConfigurations {
-
- @AutoConfiguration
- public static class AerospikeClientMockConfiguration {
-
- @Bean
- public IAerospikeClient aerospikeClientMock() {
- IAerospikeClient client = mock(IAerospikeClient.class);
- when(client.getNodes()).thenReturn(new Node[]{});
- when(client.getWritePolicyDefault()).thenReturn(new WritePolicy());
- return client;
- }
- }
-
- @AutoConfiguration
- public static class AerospikeServerVersionSupportMockConfiguration {
-
- @Bean
- public ServerVersionSupport aerospikeServerVersionSupportMock() {
- ServerVersionSupport serverVersionSupport = mock(ServerVersionSupport.class);
- when(serverVersionSupport.getServerVersion()).thenReturn("5.0.0.0");
- return serverVersionSupport;
- }
- }
-
- @AutoConfiguration
- public static class MockReactiveIndexRefresher {
-
- @Bean
- public ReactorIndexRefresher reactiveAerospikeIndexRefresher() {
- return mock(ReactorIndexRefresher.class);
- }
- }
-
- @AutoConfiguration
- @EntityScan("org.springframework.boot.autoconfigure.data.aerospike.city")
- public static class EntityScanConfiguration {
-
- }
-
- @AutoConfiguration
- public static class CustomConversionsConfig {
-
- @Bean(name = "aerospikeCustomConversions")
- AerospikeCustomConversions myCustomConversions() {
- return new AerospikeCustomConversions(List.of(new CityToStringConverter()));
- }
- }
-
- public static class CityToStringConverter implements Converter {
-
- @Override
- public String convert(City value) {
- return value.getName();
- }
- }
-}
diff --git a/spring-boot-starter-aerospike-reactive/pom.xml b/spring-boot-starter-aerospike-reactive/pom.xml
new file mode 100644
index 0000000..3884930
--- /dev/null
+++ b/spring-boot-starter-aerospike-reactive/pom.xml
@@ -0,0 +1,43 @@
+
+
+ 4.0.0
+
+
+ com.aerospike
+ spring-data-aerospike-starters
+ ${revision}
+
+
+ Spring Data Aerospike Starters: spring-boot-starter-aerospike-reactive
+ spring-boot-starter-aerospike-reactive
+ Starter for using Aerospike Reactor Java client
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ com.aerospike
+ spring-boot-autoconfigure-aerospike-common
+
+
+ com.aerospike
+ spring-boot-starter-aerospike
+
+
+ io.projectreactor
+ reactor-core
+
+
+ com.aerospike
+ aerospike-reactor-client
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+
\ No newline at end of file
diff --git a/spring-boot-starter-aerospike-reactive/src/main/java/org/springframework/boot/client/reactive/autoconfigure/AerospikeReactorClientConfiguration.java b/spring-boot-starter-aerospike-reactive/src/main/java/org/springframework/boot/client/reactive/autoconfigure/AerospikeReactorClientConfiguration.java
new file mode 100644
index 0000000..af1aa2a
--- /dev/null
+++ b/spring-boot-starter-aerospike-reactive/src/main/java/org/springframework/boot/client/reactive/autoconfigure/AerospikeReactorClientConfiguration.java
@@ -0,0 +1,56 @@
+package org.springframework.boot.client.reactive.autoconfigure;
+
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.aerospike.client.IAerospikeClient;
+import com.aerospike.client.reactor.AerospikeReactorClient;
+import com.aerospike.client.reactor.IAerospikeReactorClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.IsClientOnly;
+import org.springframework.boot.client.autoconfigure.AerospikeClientConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import reactor.core.publisher.Flux;
+
+/**
+ * {@link EnableAutoConfiguration Auto-configuration} for Aerospike client.
+ * Loaded only for client-only modules or when no namespace property is given.
+ *
+ * @author Anastasiia Smirnova
+ */
+//@EnableAutoConfiguration
+@AutoConfiguration
+@Conditional(IsClientOnly.class)
+@ConditionalOnClass({IAerospikeClient.class, IAerospikeReactorClient.class, Flux.class})
+@AutoConfigureAfter({AerospikeClientConfiguration.class})
+@Slf4j
+public class AerospikeReactorClientConfiguration {
+
+ @Bean(name = "aerospikeReactorClient", destroyMethod = "")
+ @ConditionalOnMissingBean
+ // disable destroy method, because we do not want AerospikeReactorClient to close AerospikeClient
+ public IAerospikeReactorClient aerospikeReactorClient(IAerospikeClient aerospikeClient) {
+ log.info("Initializing Aerospike Reactor Java client");
+ return new AerospikeReactorClient(aerospikeClient);
+
+ }
+}
\ No newline at end of file
diff --git a/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring.factories b/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..02930cf
--- /dev/null
+++ b/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.springframework.boot.client.reactive.autoconfigure.AerospikeReactorClientConfiguration
diff --git a/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..ab86734
--- /dev/null
+++ b/spring-boot-starter-aerospike-reactive/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+org.springframework.boot.client.reactive.autoconfigure.AerospikeReactorClientConfiguration
\ No newline at end of file
diff --git a/spring-boot-starter-aerospike/pom.xml b/spring-boot-starter-aerospike/pom.xml
new file mode 100644
index 0000000..40df572
--- /dev/null
+++ b/spring-boot-starter-aerospike/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+
+ com.aerospike
+ spring-data-aerospike-starters
+ ${revision}
+
+
+ Spring Data Aerospike Starters: spring-boot-starter-aerospike
+ spring-boot-starter-aerospike
+ Starter for using Aerospike Java client
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ com.aerospike
+ spring-boot-autoconfigure-aerospike-common
+
+
+ com.aerospike
+ aerospike-client
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+
\ No newline at end of file
diff --git a/spring-boot-starter-aerospike/src/main/java/org/springframework/boot/client/autoconfigure/AerospikeClientConfiguration.java b/spring-boot-starter-aerospike/src/main/java/org/springframework/boot/client/autoconfigure/AerospikeClientConfiguration.java
new file mode 100644
index 0000000..4b620fd
--- /dev/null
+++ b/spring-boot-starter-aerospike/src/main/java/org/springframework/boot/client/autoconfigure/AerospikeClientConfiguration.java
@@ -0,0 +1,58 @@
+package org.springframework.boot.client.autoconfigure;
+
+/*
+ * Copyright 2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import com.aerospike.client.AerospikeClient;
+import com.aerospike.client.Host;
+import com.aerospike.client.IAerospikeClient;
+import com.aerospike.client.policy.ClientPolicy;
+import jakarta.annotation.PostConstruct;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.boot.autoconfigure.AutoConfiguration;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import org.springframework.boot.autoconfigure.aerospike.AerospikeAutoConfiguration;
+import org.springframework.boot.autoconfigure.aerospike.AerospikeProperties;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.IsClientOnly;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+
+/**
+ * {@link EnableAutoConfiguration Auto-configuration} for Aerospike client.
+ * Loaded only for client-only modules or when no namespace property is given.
+ *
+ * @author Anastasiia Smirnova
+ */
+//@EnableAutoConfiguration
+@AutoConfiguration
+@Conditional(IsClientOnly.class)
+@ConditionalOnClass(IAerospikeClient.class)
+@AutoConfigureAfter({AerospikeAutoConfiguration.class})
+@Slf4j
+public class AerospikeClientConfiguration {
+
+ @Bean(name = "aerospikeClient", destroyMethod = "close")
+ @ConditionalOnMissingBean(IAerospikeClient.class)
+ public IAerospikeClient aerospikeClient(AerospikeProperties properties,
+ ClientPolicy aerospikeClientPolicy) {
+ log.info("Initializing Aerospike Java client");
+ Host[] hosts = Host.parseHosts(properties.getHosts(), properties.getDefaultPort());
+ return new AerospikeClient(aerospikeClientPolicy, hosts);
+ }
+}
diff --git a/spring-boot-starter-aerospike/src/main/resources/META-INF/spring.factories b/spring-boot-starter-aerospike/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..8f53498
--- /dev/null
+++ b/spring-boot-starter-aerospike/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+# Auto Configure
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.springframework.boot.client.autoconfigure.AerospikeClientConfiguration
diff --git a/spring-boot-starter-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/spring-boot-starter-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..74ff002
--- /dev/null
+++ b/spring-boot-starter-aerospike/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+org.springframework.boot.client.autoconfigure.AerospikeClientConfiguration
\ No newline at end of file
diff --git a/spring-boot-starter-data-aerospike-example/reactive/src/main/resources/bootstrap.properties b/spring-boot-starter-data-aerospike-example/reactive/src/main/resources/bootstrap.properties
deleted file mode 100644
index 7a55d9d..0000000
--- a/spring-boot-starter-data-aerospike-example/reactive/src/main/resources/bootstrap.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#This property is optional, it is added for convenience to quickly disable embedded-aerospike
-embedded.containers.enabled=true
\ No newline at end of file
diff --git a/spring-boot-starter-data-aerospike-example/sync/src/main/resources/bootstrap.properties b/spring-boot-starter-data-aerospike-example/sync/src/main/resources/bootstrap.properties
deleted file mode 100644
index 7a55d9d..0000000
--- a/spring-boot-starter-data-aerospike-example/sync/src/main/resources/bootstrap.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-#This property is optional, it is added for convenience to quickly disable embedded-aerospike
-embedded.containers.enabled=true
\ No newline at end of file
diff --git a/spring-boot-starter-data-aerospike-reactive/pom.xml b/spring-boot-starter-data-aerospike-reactive/pom.xml
index 0b2c827..eaf01db 100644
--- a/spring-boot-starter-data-aerospike-reactive/pom.xml
+++ b/spring-boot-starter-data-aerospike-reactive/pom.xml
@@ -18,25 +18,35 @@
org.springframework.boot
spring-boot-starter
-
+