在配置spring时经常看到.properties文件。
将数据库用户名密码写进.properties文件中,然后在.xml文件中就可以使用。
properties:
.xml:
这里的${jdbc_url}==properties的jdbc_url
如何将.properties在配置文件中使用
需要在xml配置文件中添加这个
<!-- 配置文件 -->
<context:property-placeholder location="classpath:application.properties" />