applicationcontext数据源配置本地路径
来源:互联网 发布:淘宝店铺装修风格大全 编辑:程序博客网 时间:2024/06/05 15:38
<!-- SqlMap setup for iBATIS Database Layer --><bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"><property name="configLocation" value="WEB-INF/sql-map-config.xml"/><property name="mappingLocations" value="file:/C:/Users/Moking/git/jpetstore-ibatis/WebRoot/WEB-INF/*/*.xml"></property><property name="dataSource" ref="dataSource"/></bean>
Spring,ibatis等获取xml文件中路径值是通过调用java.net.URL方法实现,路径名书写格式要按照java.net.URL的格式要求来书写。
Spring 多个配置文件件可以通过<import resource="bean.xml"/>引用,applicationContext.xml不需要
附java.net.URL路径格式:
Java Networking: URL's to Local Files
The URL
class can also be used to access files in the local file system. Thus the URL
class can be a handy way to open a file, if you need your code to not know whether the file came from the network or local file system.
Here is an example of how to open a file in the local file system using the URL
class:
URL url = new URL("file:/c:/data/test.txt");URLConnection urlConnection = url.openConnection();InputStream input = urlConnection.getInputStream();int data = input.read();while(data != -1){ System.out.print((char) data); data = input.read();}input.close();
Notice how the only difference from accessing a file on a web server via HTTP is the the URL:"file:/c:/data/test.txt"
.
- applicationcontext数据源配置本地路径
- applicationContext.xml中数据源的配置
- Spring-applicationContext.xml路径配置
- Centos--yum配置本地数据源
- Spring ApplicationContext配置文件的路径配置方式
- Spring applicationContext.xml 路径配置(1)
- Spring applicationContext.xml 配置数据源,避免连接池泄露
- 在Spring的 applicationContext.xml文件中配置数据源
- Spring 整合 hibernate的 applicationContext.xml 数据源配置
- SpringMVC配置文件applicationContext.xml操作数据源的配置
- 在spring框架中的applicationContext.xml文件配置c3p0数据源
- Spring中applicationContext.xml配置文件中数据库数据源配置
- vsts本地配置路径
- ApplicationContext.xml数据源使用,
- Tomcat 数据源配置,中文路径乱码解决
- Spring applicationContext.xml 文件 路径配置 (2)
- 在ssh项目中的applicationContext.xml中配置数据源(c3p0)(连接池)
- 在ssh项目中的applicationContext.xml中配置数据源(c3p0)(连接池)
- bat批处理小记
- HDU 1392 Surround the Trees【凸包周长】
- linux RAC asm_diskgroup未设置引起数据库实例无法打开
- 黑客是如何成长的
- iPhone开发笔记 scrollView和pageControl的搭配使用
- applicationcontext数据源配置本地路径
- HDFS架构
- 最簡單的東西總是最容易被忽視——談看不見的設計
- mysql general log
- 在 Ubuntu 上搭建 VPN 服务器
- 常见排序算法
- 利用C实现泛型(generics)效果---原地洗牌,快速排序
- 熬之滴水成石:最想深入了解的内容--windows内核机制(12)
- HttpHandler与HttpModule使用