title: Migrating to Spring data couchbase 4.1.2
body: <p>My project was in spring boot version 2.2.1 (spring-data-couchbase version 2.2.1 and couchbase SDK 3.2.1) , we have to upgrade this project to Spring boot 2.4.1 (spring-data-couchbase version 2.4.1 and couchbase SDK 4.2.1) , a lot of things have changed from couchbase SDK 3.x to 4.x , which are captured in the document <a href="https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.migrating" rel="nofollow noreferrer">here</a> ,</p>
  <p>But still I could not find some of things or configuration and how to do them in the newer version ,</p>
  <p>from the older project in version 2.2.1 ,</p>
  <pre><code>QueryServiceConfig queryServiceConfig =
          QueryServiceConfig.create(queryserviceMinEndpoint, queryserviceMaxEndpoint);
      return DefaultCouchbaseEnvironment.builder()
          .queryServiceConfig(queryServiceConfig)
          .autoreleaseAfter(autoreleaseAfter)
          .build();
  </code></pre>
  <p>It seems in the newer version they have removed QueryServiceConfig and DefaultCouchbaseEnvironment classes , Does anyone know how to define these configs in the newer version ? I mean the <code>autoreleaseAfter</code> , queryservice <code>minEndpoints</code> and <code>maxEndpoints</code> , I tried creating them via application.yaml but doesnt work , Any help is greatly appreciated.</p>
  <pre><code> spring:
          couchbase:
            password: xyz
            username: admin
            bootstrap-hosts: 127.0.0.1
            bucket:
              name: xyz
              password: xyz
            env:
              endpoints:
                queryserivce:
                  max-endpoints: 5
                  min-endpoints: 1000
              autoreleaseAfter: 20000
  </code></pre>