Search code examples
springrestspring-bootcouchbaseapi-design

What do I need to do to connect a local Couchbase server with a Spring Boot API?


I'm trying to teach myself about building functional REST APIs that support several parameters and connect with a local Couchbase that supports all basic CRUD operations. This was a project a friend suggested to me that would help with work. I'm working with Java using Maven and Spring Boot.

I'm having trouble getting the Couchbase server to connect with my Spring Boot app. I feel like this is the first step to all of this, but have been unable to find much information on it.

This was the best resource I could find on it: http://projects.spring.io/spring-data-couchbase/#quick-start

But there are definitely holes in the instructions there. It seems like that guide is for someone that is already familiar with Couchbase and with Spring Boot. Both are pretty new to me, so I think I'm misunderstanding some steps.

Currently where I'm experiencing the most trouble is "Server-Side Setup" in the Spring doc I listed above. I have a couchbase server setup, but I don't know how to plug this information in.

Any guidance, advice, or straightup help would be greatly appreciated!


Solution

  • The views referred to in that "Server Side Setup" document are Couchbase Server's incremental Map-Reduce views. Couchbase's documentation covers this both conceptually and how to create views. Unfortunately, it isn't super clear there (I filed an issue), but you will want to go to your console and then to Indexes -> Views.

    It looks like the 3.0 docs on views cover this pretty well. I'm not sure where this went in the current docs.