title: java.lang.NoSuchMethodError when using Spring Boot Starter Web dependency with Mongo Driver 3.11.0
body: <p>Using Spring Boot Starter Web dependency  with the latest MongoDB driver 3.11.0 gives the below error. When I switch to an older version of Mongo Driver like 3.8.2, this works fine. Any ideas? Should I exclude a Mongo dependency?</p>
  
  <p>If I remove the spring boot dependency, Mongo connections work fine.  </p>
  
  <pre><code>06:39:09.046 [main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[host1:27017, host2:27017, host3:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
  06:39:09.048 [main] INFO org.mongodb.driver.cluster - Adding discovered server host1:27017 to client view of cluster
  06:39:09.079 [main] INFO org.mongodb.driver.cluster - Adding discovered server host2:27017 to client view of cluster
  06:39:09.080 [main] INFO org.mongodb.driver.cluster - Adding discovered server host3:27017 to client view of cluster
  06:39:09.083 [main] DEBUG org.mongodb.driver.cluster - Updating cluster description to  {type=UNKNOWN, servers=[{address=host3:27017, type=UNKNOWN, state=CONNECTING}, {address=host1:27017, type=UNKNOWN, state=CONNECTING}, {address=host2:27017, type=UNKNOWN, state=CONNECTING}]
  Exception in thread "main" java.lang.NoSuchMethodError: com.mongodb.MongoClientSettings.getAutoEncryptionSettings()Lcom/mongodb/AutoEncryptionSettings;
      at com.mongodb.client.internal.MongoClientImpl.&lt;init&gt;(MongoClientImpl.java:67)
      at com.mongodb.client.internal.MongoClientImpl.&lt;init&gt;(MongoClientImpl.java:61)
      at com.mongodb.client.MongoClients.create(MongoClients.java:114)
      at com.mongodb.client.MongoClients.create(MongoClients.java:99)
      at com.mongodb.client.MongoClients.create(MongoClients.java:83)
      at com.mongodb.client.MongoClients.create(MongoClients.java:61)
      at com.mongo.demo.MongoDemo.main(MongoDemo.java:98)
  </code></pre>
  
  <p>pom below:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
    &lt;groupId&gt;mongo-test&lt;/groupId&gt;
    &lt;artifactId&gt;mongo-test&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;mongo-test&lt;/name&gt;
    &lt;description&gt;Mongo Test&lt;/description&gt;
        &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;2.1.8.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
          &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
          &lt;artifactId&gt;mongodb-driver-sync&lt;/artifactId&gt;
          &lt;version&gt;3.11.0&lt;/version&gt;
      &lt;/dependency&gt;
              &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.17&lt;/version&gt;
          &lt;/dependency&gt;
             &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  
          &lt;/dependency&gt; 
    &lt;/dependencies&gt;
               &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>