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.