与元素类型 "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">
												

spring自定义 xsd 位置的更多相关文章

  1. spring自定义标签之 规范定义XSD

    引言: spring的配置文件中,一切的标签都是spring定义好的.<bean/>等等,有了定义的规范,才能让用户填写的正常可用.想写自定义标签,但首先需要了解XML Schema De ...

  2. Spring 自定义标签配置

    前景:经常使用一些依赖于Spring的组件时,发现可以通过自定义配置Spring的标签来实现插件的注入,例如数据库源的配置,Mybatis的配置等.那么这些Spring标签是如何自定义配置的?学习Sp ...

  3. spring自定义schema学习

    [转载请注明作者和原文链接,欢迎讨论,相互学习.] 一.前言 1. 最近在学习dubbo,里边很多如provider.consumer.registry的配置都是通过spring自定义Schema来实 ...

  4. spring 自定义标签的实现

    在我们进行Spring 框架开发中,估计用到最多的就是bean 标签吧,其实在Spring中像<mvc/><context/>这类标签以及在dubbo配置的标签都是属于自定义的 ...

  5. spring基础---->spring自定义标签(一)

    Spring具有一个基于架构的扩展机制,可以使用xml文件定义和配置bean.本博客将介绍如何编写自定义XML bean的解析器,并用实例来加以说明.其实我一直相信 等你出现的时候我就知道是你. Sp ...

  6. spring自定义标签之 自我实现

     引言: 最近心情比较难以平静,周末的两天就跑出去散心了,西湖边上走走,看日落,还是不错的.回来博客上发现,在自定义标签上,最后一步实现忘记加上了.其实,人生的路程中,我们总是实现着自我的价值,让自己 ...

  7. Spring自定义类扫描器 ClassPathScanningCandidateComponentProvider

    项目中有个需求 读取xml文件,然后 对xml文件进行解析,比如如果是 Gender=0/1的话,分别代表男女. 所以需要在构造函数之后,初始化bean之前进行过滤解析 xml文件: <inte ...

  8. spring自定义类中@AutoWired标识的元素注入为null

    最近在做项目的时候,发现程序运行的时候有一个nullpointer exception,一脸懵逼因为感觉程序没什么逻辑.后来发现是因为new出来的component不会自动注入它的元素. 现象:@Co ...

  9. spring基础---->spring自定义初始化(二)

    这里新增了对ref属性的支持,并且过滤了已经解析的元素.人生有两个词很棒,一言不合和不提也罢. spring自定义对ref属性支持 项目的结构如下:新增一个ThirdBean类,修改了ParseXml ...

随机推荐

  1. DAY8-python异常处理

    一.什么是异常 异常就是程序运行时发生错误的信号(在程序出现错误时,则会产生一个异常,若程序没有处理它,则会抛出该异常,程序的运行也随之终止),在python中,错误触发的异常如下 而错误分两种 #语 ...

  2. 用JS,打印正立三角形

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  3. Android Studio 搭配 Tortoise SVN 安装问题汇总

    (1)Android studio 中想要使用SVN,但是在安装 1.9版本的SVN,会报SVN is too old(实际是太新了)的错误.所以只能下载1.8以下版本 (2)安装svn时,需要手动选 ...

  4. elmah数据库sql脚本

    /* 错误管理工具 SQL代码 */CREATE TABLE dbo.ELMAH_Error( ErrorId UNIQUEIDENTIFIER NOT NULL, Application NVARC ...

  5. Codeforces #505(div1+div2) B Weakened Common Divisor

    题意:给你若干个数对,每个数对中可以选择一个个元素,问是否存在一种选择,使得这些数的GCD大于1? 思路:可以把每个数对的元素乘起来,然后求gcd,这样可以直接把所有元素中可能的GCD求出来,从小到大 ...

  6. Codeforces #504(div1+div2) 1023D Array Restoration(线段树)

    题目大意:给你一个数组,数组是经过q次区间覆盖后的结果,第i次覆盖是把区间内的值赋值为i,其中有若干个地方数值未知(就是0),让你判断这个数组是否可以经过覆盖后得到的,如果可以,输出任意一种可行数组. ...

  7. MarkdownPad 2 安装和破解

    MarkdownPad 2 安装和破解 下载:http://markdownpad.com/ 下载下面这个: 破解:http://w3cboy.com/post/2014/10/MarkdownPad ...

  8. 把文档转化为PDF再用PS处理PDF

    最近工作中遇到类似下面这样的一个文档. 文档当前设置的是A4 横版打印,可以明显的看到打印的分界线,这样直接打印出来,是没有下面那行“bbbbbbbbbbbbbbbbbb”的,怎么办?可以通过 页面布 ...

  9. Django框架 之 view视图

    Django框架 之 view视图 浏览目录 概述 简单的视图 HttpRequest对象 CBV和FBV 给视图加装饰器 Request对象 Response对象 JsonResponse对象 Dj ...

  10. Django 链接数据库错误 Strick Mode 解决

    报错信息: WARNINGS:?: (mysql.W002) MySQL Strict Mode is not set for database connection ‘default‘HINT: M ...