Skip to content

Commit

Permalink
Fix does not support multi store setups (#132)
Browse files Browse the repository at this point in the history
* Fix does not support multi-store setups.

* Make getIdentifyingAnnotations return singleton collection.
  • Loading branch information
junghoon-vans authored Jan 1, 2025
1 parent 0c12275 commit 305bb49
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
*/
package io.vanslog.spring.data.meilisearch.repository.config;

import io.vanslog.spring.data.meilisearch.annotations.Document;
import io.vanslog.spring.data.meilisearch.repository.support.MeilisearchRepositoryFactoryBean;

import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.Collections;

import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
Expand All @@ -39,6 +44,11 @@ public String getRepositoryFactoryBeanClassName() {
return MeilisearchRepositoryFactoryBean.class.getName();
}

@Override
protected Collection<Class<? extends Annotation>> getIdentifyingAnnotations() {
return Collections.singleton(Document.class);
}

@Override
protected String getModulePrefix() {
return getModuleIdentifier();
Expand Down

0 comments on commit 305bb49

Please sign in to comment.