Merge pull request #7817 from lukaszrys/feature/BAEL-1869_fix_tests
[ BAEL-1869 ] : Restroe indexManager, fix view name to be equal to th…
This commit is contained in:
commit
8da0c75aef
|
@ -2,7 +2,11 @@ package com.baeldung.couchbase.configuration;
|
|||
|
||||
import com.couchbase.client.java.env.CouchbaseEnvironment;
|
||||
import com.couchbase.client.java.env.DefaultCouchbaseEnvironment;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.couchbase.config.AbstractReactiveCouchbaseConfiguration;
|
||||
import org.springframework.data.couchbase.config.BeanNames;
|
||||
import org.springframework.data.couchbase.repository.support.IndexManager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,4 +40,9 @@ public abstract class ReactiveCouchbaseConfiguration extends AbstractReactiveCou
|
|||
.bootstrapHttpDirectPort(couchbaseProperties.getPort())
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean(name = BeanNames.COUCHBASE_INDEX_MANAGER)
|
||||
public IndexManager couchbaseIndexManager() {
|
||||
return new IndexManager(true, true, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.UUID;
|
|||
@ViewIndexed(designDoc = ViewPersonRepository.DESIGN_DOCUMENT)
|
||||
public interface ViewPersonRepository extends ReactiveCrudRepository<Person, UUID> {
|
||||
|
||||
String DESIGN_DOCUMENT = "persons";
|
||||
String DESIGN_DOCUMENT = "person";
|
||||
|
||||
@View(designDocument = ViewPersonRepository.DESIGN_DOCUMENT)
|
||||
Flux<Person> findByFirstName(String firstName);
|
||||
|
|
Loading…
Reference in New Issue