diff --git a/src/main/java/org/springframework/data/couchbase/core/CouchbaseTemplateSupport.java b/src/main/java/org/springframework/data/couchbase/core/CouchbaseTemplateSupport.java index 6754f0297..3764cd778 100644 --- a/src/main/java/org/springframework/data/couchbase/core/CouchbaseTemplateSupport.java +++ b/src/main/java/org/springframework/data/couchbase/core/CouchbaseTemplateSupport.java @@ -190,7 +190,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws /** * Set the {@link EntityCallbacks} instance to use when invoking * {@link org.springframework.data.mapping.callback.EntityCallback callbacks} like the {@link BeforeConvertCallback}. - *

+ *

* Overrides potentially existing {@link EntityCallbacks}. * * @param entityCallbacks must not be {@literal null}. diff --git a/src/main/java/org/springframework/data/couchbase/core/ReactiveCouchbaseTemplateSupport.java b/src/main/java/org/springframework/data/couchbase/core/ReactiveCouchbaseTemplateSupport.java index 7805b2b94..fda461de8 100644 --- a/src/main/java/org/springframework/data/couchbase/core/ReactiveCouchbaseTemplateSupport.java +++ b/src/main/java/org/springframework/data/couchbase/core/ReactiveCouchbaseTemplateSupport.java @@ -200,7 +200,7 @@ public void setApplicationContext(ApplicationContext applicationContext) throws * Set the {@link ReactiveEntityCallbacks} instance to use when invoking * {@link org.springframework.data.mapping.callback.ReactiveEntityCallbacks callbacks} like the * {@link ReactiveBeforeConvertCallback}. - *

+ *

* Overrides potentially existing {@link EntityCallbacks}. * * @param reactiveEntityCallbacks must not be {@literal null}. diff --git a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java index 3df69933b..ead8146ed 100644 --- a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java +++ b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseDocument.java @@ -215,7 +215,7 @@ public CouchbaseDocument setContent(final JsonObject payload) { /** * Returns the expiration time of the document. - *

+ *

* If the expiration time is 0, then the document will be persisted until deleted manually ("forever"). * * @return the expiration time of the document. @@ -226,9 +226,9 @@ public int getExpiration() { /** * Set the expiration time of the document. - *

+ *

* If the expiration time is 0, then the document will be persisted until deleted manually ("forever"). - *

+ *

* Expiration should be expressed as seconds if <= 30 days (30 x 24 x 60 x 60 seconds), or as an expiry date (UTC, * UNIX time ie. seconds form the Epoch) if > 30 days. * diff --git a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseList.java b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseList.java index a6ba8990f..d7cd4b8a1 100644 --- a/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseList.java +++ b/src/main/java/org/springframework/data/couchbase/core/mapping/CouchbaseList.java @@ -186,10 +186,8 @@ public final boolean isEmpty() { /** * Verifies that only values of a certain and supported type can be stored. - *

*

* If this is not the case, a {@link IllegalArgumentException} is thrown. - *

* * @param value the object to verify its type. */ diff --git a/src/main/java/org/springframework/data/couchbase/repository/auditing/CouchbaseAuditingRegistrar.java b/src/main/java/org/springframework/data/couchbase/repository/auditing/CouchbaseAuditingRegistrar.java index 7120205ce..9338caaf2 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/auditing/CouchbaseAuditingRegistrar.java +++ b/src/main/java/org/springframework/data/couchbase/repository/auditing/CouchbaseAuditingRegistrar.java @@ -19,6 +19,7 @@ import java.lang.annotation.Annotation; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; @@ -70,7 +71,11 @@ protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingCon Assert.notNull(configuration, "AuditingConfiguration must not be null!"); BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(IsNewAwareAuditingHandler.class); - builder.addConstructorArgReference(BeanNames.COUCHBASE_MAPPING_CONTEXT); + + BeanDefinitionBuilder definition = BeanDefinitionBuilder.genericBeanDefinition(PersistentEntitiesFactoryBean.class); + definition.setAutowireMode(AbstractBeanDefinition.AUTOWIRE_CONSTRUCTOR); + + builder.addConstructorArgValue(definition.getBeanDefinition()); return configureDefaultAuditHandlerAttributes(configuration, builder); } diff --git a/src/main/java/org/springframework/data/couchbase/repository/query/support/N1qlUtils.java b/src/main/java/org/springframework/data/couchbase/repository/query/support/N1qlUtils.java index 522b018e7..bd3668f67 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/query/support/N1qlUtils.java +++ b/src/main/java/org/springframework/data/couchbase/repository/query/support/N1qlUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2020 the original author or authors + * Copyright 2012-2022 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. @@ -26,6 +26,7 @@ import org.springframework.data.couchbase.core.convert.CouchbaseConverter; import org.springframework.data.couchbase.core.mapping.CouchbasePersistentEntity; import org.springframework.data.couchbase.core.mapping.CouchbasePersistentProperty; +import org.springframework.data.couchbase.core.mapping.Field; import org.springframework.data.couchbase.core.query.N1QLExpression; import org.springframework.data.couchbase.core.query.N1QLQuery; import org.springframework.data.couchbase.repository.query.CouchbaseEntityInformation; diff --git a/src/main/java/org/springframework/data/couchbase/repository/support/ViewPostProcessor.java b/src/main/java/org/springframework/data/couchbase/repository/support/ViewPostProcessor.java index 34851e30f..c0ec3516a 100644 --- a/src/main/java/org/springframework/data/couchbase/repository/support/ViewPostProcessor.java +++ b/src/main/java/org/springframework/data/couchbase/repository/support/ViewPostProcessor.java @@ -62,7 +62,7 @@ public ViewMetadataProvider getViewMetadataProvider() { /** * {@link MethodInterceptor} to inspect the currently invoked {@link Method} for a {@link View} annotation. - *

+ *

* If a View annotation is found, it will bind it to a locally held ThreadLocal for later lookup in the * SimpleCouchbaseRepository class. * diff --git a/src/test/java/org/springframework/data/couchbase/util/ClusterInvocationProvider.java b/src/test/java/org/springframework/data/couchbase/util/ClusterInvocationProvider.java index e4d159f65..a32bb6854 100644 --- a/src/test/java/org/springframework/data/couchbase/util/ClusterInvocationProvider.java +++ b/src/test/java/org/springframework/data/couchbase/util/ClusterInvocationProvider.java @@ -31,7 +31,6 @@ *

* Note that the internals on what and how the containers are managed is up to the {@link TestCluster} implementation, * and if it is unmanaged than this very well be mostly a "stub". - *

* * @since 2.0.0 */ diff --git a/src/test/java/org/springframework/data/couchbase/util/TestClusterConfig.java b/src/test/java/org/springframework/data/couchbase/util/TestClusterConfig.java index 3dc867ac3..bdaac406a 100644 --- a/src/test/java/org/springframework/data/couchbase/util/TestClusterConfig.java +++ b/src/test/java/org/springframework/data/couchbase/util/TestClusterConfig.java @@ -79,7 +79,6 @@ public Optional clusterCert() { * Finds the first node with a given service enabled in the config. *

* This method can be used to find bootstrap nodes and similar. - *

* * @param service the service to find. * @return a node config if found, empty otherwise. diff --git a/src/test/java/org/springframework/data/couchbase/util/Util.java b/src/test/java/org/springframework/data/couchbase/util/Util.java index f03c13487..06710bb90 100644 --- a/src/test/java/org/springframework/data/couchbase/util/Util.java +++ b/src/test/java/org/springframework/data/couchbase/util/Util.java @@ -33,7 +33,7 @@ public class Util { * Waits and sleeps for a little bit of time until the given condition is met. * *

Sleeps 1ms between "false" invocations. It will wait at most one minute to prevent hanging forever in case - * the condition never becomes true.

+ * the condition never becomes true. * * @param supplier return true once it should stop waiting. */ @@ -83,7 +83,7 @@ public static boolean threadRunning(final String name) { * Reads a file from the resources folder (in the same path as the requesting test class). * *

The class will be automatically loaded relative to the namespace and converted - * to a string.

+ * to a string. * * @param filename the filename of the resource. * @param clazz the reference class.