在配置spring时经常看到.properties文件。
spring配置文件中properties的使用
将数据库用户名密码写进.properties文件中,然后在.xml文件中就可以使用。
properties:spring配置文件中properties的使用
.xml:
spring配置文件中properties的使用
这里的${jdbc_url}==properties的jdbc_url

如何将.properties在配置文件中使用

需要在xml配置文件中添加这个

<!-- 配置文件 -->
	<context:property-placeholder location="classpath:application.properties" />

相关文章: