• spring自定义 xsd 位置


    与元素类型 "beans" 相关联的属性 "xsi:schemaLocation" 的前缀 "xsi" 未绑定。

    解决办法:(绿色字体)

    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://localhost:8081/nexus/content/groups/public/spring/schema/beans/spring-beans-4.3.xsd 
        http://www.springframework.org/schema/mvc
        http://localhost:8081/nexus/content/groups/public/spring/schema/mvc/spring-mvc-4.3.xsd">

    其中 

    http://localhost:8081/nexus/content/groups/public/spring/schema/mvc/spring-mvc-4.3.xsd 为 本地 maven 目录,而且 必须 为 /schema/mvc/***.xsd 结尾。。否则会报错。!!

    别漏写 绿色部分,否则也会报错 。。。。。下面附上 spring 和 springMvc 代码

    spring
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://localhost:8081/nexus/content/groups/public/schema/spring/p"
        xmlns:context="http://www.springframework.org/schema/context" 
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://localhost:8081/nexus/content/groups/public/spring/schema/beans/spring-beans-4.3.xsd 
        http://www.springframework.org/schema/context 
        http://localhost:8081/nexus/content/groups/public/spring/schema/context/spring-context-4.3.xsd 
        http://www.springframework.org/schema/tx
        http://localhost:8081/nexus/content/groups/public/spring/schema/tx/spring-tx-4.3.xsd
        http://www.springframework.org/schema/aop
        http://localhost:8081/nexus/content/groups/public/spring/schema/aop/spring-aop-4.3.xsd">

    springMvc:

    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://localhost:8081/nexus/content/groups/public/schema/spring/p"
        xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://localhost:8081/nexus/content/groups/public/spring/schema/beans/spring-beans-4.3.xsd 
        http://www.springframework.org/schema/context 
        http://localhost:8081/nexus/content/groups/public/spring/schema/context/spring-context-4.3.xsd 
        http://www.springframework.org/schema/tx
        http://localhost:8081/nexus/content/groups/public/spring/schema/tx/spring-tx-4.3.xsd
        http://www.springframework.org/schema/aop
        http://localhost:8081/nexus/content/groups/public/spring/schema/aop/spring-aop-4.3.xsd
        http://www.springframework.org/schema/mvc
        http://localhost:8081/nexus/content/groups/public/spring/schema/mvc/spring-mvc-4.3.xsd">


  • 相关阅读:
    复旦大学高等代数期末考试班级前几名
    复旦高等代数 II(17级)每周一题
    复旦大学2017--2018学年第一学期高等代数I期末考试情况分析
    复旦大学2017--2018学年第一学期(17级)高等代数I期末考试第六大题解答
    复旦大学2017--2018学年第一学期(17级)高等代数I期末考试第七大题解答
    复旦大学2017--2018学年第一学期(17级)高等代数I期末考试第八大题解答
    复旦高等代数 I(17级)每周一题
    复旦大学高等代数考试命题的若干经验
    复旦大学数学学院高等代数历届期中考试大题精选之三(18级)
    复旦大学数学学院转入大数据学院的14级同学对高等代数课程的评价
  • 原文地址:https://www.cnblogs.com/whm-blog/p/7163905.html
Copyright © 2020-2023  润新知