使用YAML的<bean id =“ jndiTemplate” class =“ org.springframework.jndi.JndiTemplate”>中的java.naming.provider.url

时间:2019-01-30 14:39:03

标签: spring spring-boot

jms.java.naming.provider.url不能从application.yaml获取价值

<bean id="yamlProperties" class="org.springframework.beans.factory.config.YamlPropertiesFactoryBean">
    <property name="resources" value="classpath:application.yaml"/>
</bean>

<context:property-placeholder properties-ref="yamlProperties"/>

<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
    <property name="environment">
        <props>
            <prop key="java.naming.factory.initial">string-works</prop>
            <prop key="java.naming.provider.url">${jms.java.naming.provider.url}</prop>
        </props>
    </property>
</bean>

0 个答案:

没有答案