无法否定YAML文件中的Spring默认配置文件

时间:2018-10-22 10:24:15

标签: java spring spring-boot yaml

我无法在我的YML配置中取消配置文件:

spring:
    autoconfigure:
        exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
    profiles:
        default: '!mock'

以上配置来自application-mock.yml,之前我使用的properites文件在所有情况下都运行良好,但是现在我将其迁移到基于yml的配置中,并且在启动Spring Boot应用程序时(带有模拟活动配置文件的ofc)我收到有关缺少bean作为参数构造函数的错误。我该如何解决这个问题?

0 个答案:

没有答案