org.springframework.boot.env.OriginTrackedYamlLoader.createYaml

文章讲述了在SpringBoot应用中尝试调用不存在的方法,源于`org.yaml.snakeyaml.LoaderOptions`的冲突。解决方法是在pom.xml中添加单一致兼容的snakeyaml依赖。
摘要由CSDN通过智能技术生成
Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:69)

The following method did not exist:

    org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(I)V

The method's class, org.yaml.snakeyaml.LoaderOptions, is available from the following locations:

    jar:file:/E:/apache-maven-3.6.3/kucun/org/yaml/snakeyaml/1.23/snakeyaml-1.23-android.jar!/org/yaml/snakeyaml/LoaderOptions.class
    jar:file:/E:/apache-maven-3.6.3/kucun/org/yaml/snakeyaml/1.27/snakeyaml-1.27.jar!/org/yaml/snakeyaml/LoaderOptions.class

The class hierarchy was loaded from the following locations:

    org.yaml.snakeyaml.LoaderOptions: file:/E:/apache-maven-3.6.3/kucun/org/yaml/snakeyaml/1.23/snakeyaml-1.23-android.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.yaml.snakeyaml.LoaderOptions

解决办法在pom.xml开头位置添加如下依赖即可

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>
点赞 -收藏 -关注
有问题在评论区或者私信我-收到会在第一时间回复
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

胡安民

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值