现在在用websphere服务器,在服务器启动时spring的配置文件中会报一个异常,nested exception is org.xml.sax.SAXParseException: cvc-elt.1:找不到元素“beans”的声明。”
spring配置文件 引入DTD这种方式在websphere 6.1 下不成功,必须改成 使用schema这种方式。
DTD:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans default-autowire="byName">
SCHEMA:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-autowire="byName">
default-autowire="byName">