• xml文件报错(持续总结,持续更新)


    集合我的bug,不懂就百度,一些能解决一些只能靠自己去debug

    总结两条关于xml文件报错,后续有关于xml的错误也会更新~~

    1.the prefix aop for element "aop:config" is not bound错误

    在使用<aop:config>标签时,xml编译错误报:the prefix aop for element "aop:config" is not bound错误

    原因是:未在xml文件头部导入xmlns:aop=“http://www.springframework.org/schema/aop”

              

    2.The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    它的头文件是这样的

    1. <?xml version="1.0" encoding="UTF-8"?>  
    2. <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"   
    3. "http://mybatis.org/dtd/mybatis-3-config.dtd">  

    但它错误提示一直显示在第三那里,通过翻译错误提示,可以知道:

    每个标签必须按顺序写:The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments?,mappers?)". 

    3.Description    Resource    Path    Location    Type Dynamic Web Module 4.0 requires Java 1.8 or newer.   

     这虽然不是xml的问题,是整个项目报错,但是解决的办法是在pom.xml文件中插入下面一段代码解决:

    在<build></build>中添加

    <plugins> 
    <plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <version>2.3.2</version> 
    <configuration> 
    <source>1.8</source> 
    <target>1.8</target> 
    </configuration> 
    </plugin> 
    </plugins>



  • 相关阅读:
    大数据的起步:初学者
    接触区块链
    学习开始了,博客开始了
    hadoop分布式的搭建过程
    Java笔试题
    JavaSCript全局变量与局部变量
    OSGI
    restful
    jersey
    JSP+Servlet+Mybits小例子
  • 原文地址:https://www.cnblogs.com/liva-/p/11250638.html
Copyright © 2020-2023  润新知