首页 > 其他分享 >mybatis_17_根据properties元素的url属性指定的路径读取属性文件

mybatis_17_根据properties元素的url属性指定的路径读取属性文件

时间:2022-10-18 16:05:05浏览次数:76  
标签:文件 17 示例 url mybatis properties 属性

定义一个属性文件config.properties, 文档结构示例:

 

 文件内容示例:

url=jdbc:postgresql://172.16.x.x:5432/database_name

  在mybatis-config2.xml的proeprties属性中指定url,其中url的样式为file:\\\{config.properties文件绝对路径}

示例:

<properties url="file:\\\D:\WEBDEMO\simple\src\main\resources\config.properties">
</properties>

  

标签:文件,17,示例,url,mybatis,properties,属性
From: https://www.cnblogs.com/woniu123/p/16802841.html

相关文章