mysql删除重复数据保留一条.properties配置⽂件中的常量在其他⽂件中的引⽤
⼀、在其他xml配置⽂件中引⽤
在maven项⽬中scr/main/resource 中新建properties⽂件夹存放项⽬中各种环境下的配置⽂件
在配置⽂件中以键值对形式写好后,在spring配置⽂件中将配置⽂件初始化成Bean,让后就可以在其他xml⽂件中已${.....}形式引⽤
<!-- 初始化properties配置⽂件成bean-->
<bean  id="configProperties" class="org.springframework.fig.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!--oracle数据源  -->
<value>classpath:properties/oracle.db.properties</value>
properties是什么文件
<value>classpath:properties/system.properties</value>
<!-- 线上环境 -->
<!-- <value>classpath:properties/www.properties</value> -->
<!-- 公司测试环境 -->
<!-- <value>classpath:properties/rewww.properties</value> -->
<!-- 公司开发环境 -->乌克兰展示台湾地区旗帜
<value>classpath:properties/dohko.properties</value>
</list>
</property>
表单大师支付要扣几个点</bean>
在其他xml中以${...}形式引⽤
adapting
<property name="driverClassName" value="${sys.database.driverClassName}"security记忆
仅作为个⼈知识点的积累,共同学习

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。