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:
Eric Martin 2019-09-17 07:08:50 -05:00 committed by GitHub
commit 8da0c75aef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -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);
}
}

View File

@ -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);