spring配置文件注解方式引入的两种方式
生活随笔
收集整理的這篇文章主要介紹了
spring配置文件注解方式引入的两种方式
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、#{beanID['propertiesName']}方式
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"><property name="fileEncoding" value="utf-8" /><property name="locations"><list><value>classpath:/config/pay-alipay.properties</value></list></property> </bean> @Value("#{propertyConfigurer['workFlow.url']}") private String flowUrl;二、${'propertiesName'}方式
@Value("${material.qrCode.target.url}") private String qrCodeUrl;?
轉載于:https://www.cnblogs.com/cocoat/p/6628147.html
總結
以上是生活随笔為你收集整理的spring配置文件注解方式引入的两种方式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mybatis的select、inser
- 下一篇: 请求WebApi的几种方式