title: Name expected error when using @EnableAutoConfiguration in Spring Boot
body: <p>I was having a similar error to the one found <a href="https://stackoverflow.com/questions/35415308/exception-in-monitor-thread-while-connecting-to-server-localhost27017-while-acc">here</a> and also <a href="https://stackoverflow.com/questions/28747909/how-to-disable-spring-data-mongodb-autoconfiguration-in-spring-boot">here</a>. I attempted to use @EnableAutoConfiguration to fix the error as was suggested, but IntelliJ gives me an error and says &quot;Name expected&quot;. I am unsure what exactly is causing this problem. One possible difference is that I am working in Kotlin and not in Java.
  Here is the line that is returning the error.</p>
  <pre><code>@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
  </code></pre>
  <p>I also attempted to use the second question's solution of:</p>
  <pre><code>@SpringBootApplication(exclude = {MongoAutoConfiguration.class})
  </code></pre>
  <p>But this had the same error.</p>