I'm trying to have a Spring Data Couchbase configuration.
Here is the configuration class:
@Configuration
@EnableCouchbaseRepositories(basePackages = { "com.thalasoft.data.couchbase.repository" }, basePackageClasses = { BaseRepository.class })
public class CouchbaseConfiguration extends AbstractCouchbaseConfiguration {
private static Logger logger = LoggerFactory.getLogger(CouchbaseConfiguration.class);
@Autowired
private CouchbaseProperties couchbaseProperties;
@Override
protected List<String> getBootstrapHosts() {
return Collections.singletonList(couchbaseProperties.getHost());
}
@Override
protected String getBucketName() {
return couchbaseProperties.getBucketName();
}
@Override
protected String getBucketPassword() {
return couchbaseProperties.getBucketPassword();
}
}
I get the following error:
Invalid default: public abstract java.lang.Class org.springframework.data.couchbase.repository.config.EnableCouchbaseRepositories.repositoryBaseClass()
I also tried with:
@EnableCouchbaseRepositories(basePackages = { "com.thalasoft.data.couchbase.repository" })
But I get the exact same error.
I also then tried with:
@EnableCouchbaseRepositories(basePackages = { "com.thalasoft.data.couchbase.repository" }, repositoryBaseClass = BaseRepository.class )
But I get the exact same error.
My Couchbase instance is running and accessible.
I'm using Spring 4.2.0.RELEASE with spring-data-couchbase 2.0.0.M1 against Couchbase 2.5.1 enterprise edition (build-1083)
The repository is:
public interface AnswerRepository extends BaseRepository<Answer, String> {
@View(viewName = "answers_by_id")
public List<Answer> findById(String id);
Answer findByUuid(String uuid);
}
@NoRepositoryBean
public interface BaseRepository<T, ID extends Serializable> extends Repository<T, ID> {
}
CrudRepository<Answer, String>or evenCouchbaseRepository<Answer, String>? - Simon Baslépublic interface AnswerRepository extends Repository<Answer, String>but it gave me the exact same error. - Stephanejava.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.jpa.repository.config.EnableJpaRepositories.repositoryBaseClass()This project would normally build. - Stephane