在application.context中无法识别Yaml文件

时间:2018-02-22 12:42:25

标签: spring yaml

我正在尝试使用yaml而不是属性,并且在我拥有的每个应用程序上下文中,我都放了application.yml

<!-- Enable the configuration for utilization of @PropertySource & @Value
    annotations -->
<bean
    class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
    <property name="ignoreUnresolvablePlaceholders" value="true" />
    <property name="locations">
        <list>
            <value>classpath:Messages.properties</value>
            <value>classpath:application.yml</value>
        </list>
    </property>
</bean>

但是,应用程序无法识别文件:“无法解析文件'application.yml”,并且@Value中的属性未被翻译。

我把man.uaml的application.yaml放在每个资源文件夹中,但不起作用, 我需要做什么?

由于

0 个答案:

没有答案