加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

XML网络中的配置文件更改为本地读取

发布时间:2020-12-16 08:23:46 所属栏目:百科 来源:网络整理
导读:文件: beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmln

文件:<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p">

如上所示在XML中的配置文件规范,有很多都是从网络中加载的,一旦没有网络项目将无法正常启动,因此可以将网络中的文件事先下载到本地并加添到项目中,然后引入到配置文件中即可。例如需要引用spring的定时器的XML文件可以在Context中这样配置:classpath:/spring-task-3.1.XML即可。上面的网址形的引入文件配置都可以替换成本地的文件引入,这个在内网开发经常用到。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读