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">
spring自定义 xsd 位置的更多相关文章
- spring自定义标签之 规范定义XSD
引言: spring的配置文件中,一切的标签都是spring定义好的.<bean/>等等,有了定义的规范,才能让用户填写的正常可用.想写自定义标签,但首先需要了解XML Schema De ...
- Spring 自定义标签配置
前景:经常使用一些依赖于Spring的组件时,发现可以通过自定义配置Spring的标签来实现插件的注入,例如数据库源的配置,Mybatis的配置等.那么这些Spring标签是如何自定义配置的?学习Sp ...
- spring自定义schema学习
[转载请注明作者和原文链接,欢迎讨论,相互学习.] 一.前言 1. 最近在学习dubbo,里边很多如provider.consumer.registry的配置都是通过spring自定义Schema来实 ...
- spring 自定义标签的实现
在我们进行Spring 框架开发中,估计用到最多的就是bean 标签吧,其实在Spring中像<mvc/><context/>这类标签以及在dubbo配置的标签都是属于自定义的 ...
- spring基础---->spring自定义标签(一)
Spring具有一个基于架构的扩展机制,可以使用xml文件定义和配置bean.本博客将介绍如何编写自定义XML bean的解析器,并用实例来加以说明.其实我一直相信 等你出现的时候我就知道是你. Sp ...
- spring自定义标签之 自我实现
引言: 最近心情比较难以平静,周末的两天就跑出去散心了,西湖边上走走,看日落,还是不错的.回来博客上发现,在自定义标签上,最后一步实现忘记加上了.其实,人生的路程中,我们总是实现着自我的价值,让自己 ...
- Spring自定义类扫描器 ClassPathScanningCandidateComponentProvider
项目中有个需求 读取xml文件,然后 对xml文件进行解析,比如如果是 Gender=0/1的话,分别代表男女. 所以需要在构造函数之后,初始化bean之前进行过滤解析 xml文件: <inte ...
- spring自定义类中@AutoWired标识的元素注入为null
最近在做项目的时候,发现程序运行的时候有一个nullpointer exception,一脸懵逼因为感觉程序没什么逻辑.后来发现是因为new出来的component不会自动注入它的元素. 现象:@Co ...
- spring基础---->spring自定义初始化(二)
这里新增了对ref属性的支持,并且过滤了已经解析的元素.人生有两个词很棒,一言不合和不提也罢. spring自定义对ref属性支持 项目的结构如下:新增一个ThirdBean类,修改了ParseXml ...
随机推荐
- ssh框架整合其他方式(没有hibernate核心配置文件)
- 每天一道算法题(32)——输出数组中第k小的数
1.题目 快速输出第K小的数 2.思路 使用快速排序的思想,递归求解.若键值位置i与k相等,返回.若大于k,则在[start,i-1]中寻找第k大的数.若小于k.则在[i+1,end]中寻找第k+st ...
- 关联查询 join的使用
#!/usr/bin/env python import sqlalchemy from sqlalchemy import create_engine from sqlalchemy.ext.dec ...
- 为SSRS配置SMTP服务器身份验证
此处设置外邮地址却无法填写邮箱密码 一.安装SMTP服务 1.在服务管理器中单击“功能” 2.单击“添加功能”打开“添加功能向导”对话框 3.在“选择功能”页上选择“SMTP服务器”并选择“添加必须的 ...
- 指定jdk编译或运行
set JAVA_HOME=D:\java\jdk8 set CLASSPATH=.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOMe%\lib\tools.jar; set Pat ...
- 一个典型的PHP分页实例代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 算法Sedgewick第四版-第1章基础-2.3 Quicksort-001快速排序
一. 1.特点 (1)The quicksort algorithm’s desirable features are that it is in-place (uses only a small a ...
- GTK编程
一.简介 GTK(GIMP Toolkit)是一套跨多种平台的图形工具包,按LGPL许可协议发布的.虽然最初是为GIMP写的,但早已发展为一个功能强大.设计灵活的通用图形库.特别是被GNOME选中使得 ...
- Luogu U15118 萨塔尼亚的期末考试(fail)
感觉...昨天是真的傻... 题意 T个询问,每个询问给一个n,求 $ \frac{\sum_{n}^{i = 1}Fib_{i} * i}{n * (n + 1) / 2} $ Fib是斐波那契数列 ...
- python3-打印一个进度条
# Auther: Aaron Fan import sys,time for i in range(30): #打印一个#号,这种方法打印不会自动换行 sys.stdout.write('#') # ...