zoukankan      html  css  js  c++  java
  • Spring—Document root element "beans", must match DOCTYPE root "null"分析及解决方法

    网上很多人说要把applicationContex.xml文件中加上如下第二行的<!DOCTYPE/>标签,说明DTD。
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

    看一下代码,标红处是为了解决标题所出现的报错的。标绿的地方主要是spring的版本问题,需要你找到对应自己版本即可。

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
               http://www.springframework.org/schema/aop 
               http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
               http://www.springframework.org/schema/context
               http://www.springframework.org/schema/context/spring-context-3.0.xsd
               http://cxf.apache.org/jaxws 
               http://cxf.apache.org/schemas/jaxws.xsd 
               http://www.springframework.org/schema/mvc
               http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
               http://www.springframework.org/schema/tx
               http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" default-autowire="byName">
  • 相关阅读:
    小技巧
    sql日期函数
    c#发送邮件
    js点滴
    Js序列化时间
    js中string的操作
    原系统中有AD FS , CRM Server ,迁移ADFS 到另一台电脑 , CRM Server用443端口出错
    解决UR 12后ISV目录不能用的问题
    Lucene .Net 版本
    Android 开源项目
  • 原文地址:https://www.cnblogs.com/qcq0703/p/9040783.html
Copyright © 2011-2022 走看看