【发布时间】:2021-04-13 15:55:30
【问题描述】:
我遇到了与 here 和 here 发现的错误类似的错误。我尝试按照建议使用 @EnableAutoConfiguration 来修复错误,但 IntelliJ 给了我一个错误并说“预期名称”。我不确定究竟是什么导致了这个问题。一个可能的区别是我在 Kotlin 而不是 Java 中工作。 这是返回错误的行。
@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
我也尝试使用第二个问题的解决方案:
@SpringBootApplication(exclude = {MongoAutoConfiguration.class})
但这也有同样的错误。
【问题讨论】:
标签: java spring spring-boot kotlin gradle