1

I was having a similar error to the one found here and also here. I attempted to use @EnableAutoConfiguration to fix the error as was suggested, but IntelliJ gives me an error and says "Name expected". 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.

@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})

I also attempted to use the second question's solution of:

@SpringBootApplication(exclude = {MongoAutoConfiguration.class})

But this had the same error.

1 Answers1

3

Your guess about Kotlin is right. You're trying to use Java syntax in Kotlin. In Kotlin the first annotation will look like this:

@EnableAutoConfiguration(exclude = [MongoAutoConfiguration::class])

Check Kotlin documentation about annotations for more details if necessary.

yuppie-flu
  • 1,270
  • 9
  • 13