头疼的spring加载问题:
断网运行jar包加载spring文件时,提示cvc-elt.1: Cannot find the declaration of element 'beans'.
在网上搜索N种方法,最后发现适合我自己程序的是该方法:
[b]替换文件头部[/b]
[b][u]源文件头部[/u][/b]
[b][u]替换后[/u][/b]
当然网上嗨有其他方法可以使用的方法,但是觉得不是好的办法
将spring的目录org放到本地web服务的根目录中,使用本地IP访问,如:
断网运行jar包加载spring文件时,提示cvc-elt.1: Cannot find the declaration of element 'beans'.
在网上搜索N种方法,最后发现适合我自己程序的是该方法:
[b]替换文件头部[/b]
[b][u]源文件头部[/u][/b]
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
[b][u]替换后[/u][/b]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN/EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
当然网上嗨有其他方法可以使用的方法,但是觉得不是好的办法
将spring的目录org放到本地web服务的根目录中,使用本地IP访问,如:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://192.168.11.23/org/springframework/beans/factory/xml/spring-beans-3.0.xsd">