解决spring配置文件没有提示的问题
我们使用eclipse编辑spring配置文件时,经常没有提示,而无从下手时. 现在我们就来解决没有提示的问题.
原因是因为eclipse中没有配置xsd文件..
步骤一:把如下头文件拷贝到你的spring配置文件中.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
</beans>
步骤二:根据头文件的中的链接点击去下载spring对应版本的.xsd文件 到本地..
步骤三:下载好之后,接下来就是要添加到eclipse中.
在eclipse菜单中进入
window->prefernces->XML->XML Catalog->Add ->File System,然后选择刚才下载下来的.xsd文件
location:比如C:\spring-beans-2.5.xsd
key type:选择Schema Location
key:填写http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
添加完成之后,重启eclipse 看看是否有提示.. ..如果还没有就多添加几个版本的.xsd文件..试试。
解决spring配置文件没有提示的问题的更多相关文章
- 解决Spring配置文件不显示design和source, namespace 问题
之前撸代码一直没太关注这个问题,后来发现对于不太熟悉配置文件内容的小伙伴们来说是比较痛苦的,因为每个配置项都需要你记住或者拷贝别人现成配置 那么问题来了,今天在写发现我的Spring配置文件不显示de ...
- 通过IDEA解决spring配置文件
来自:https://blog.csdn.net/yanghanxiu/article/details/79366263 (其实尼可以使用springboot 这样就不用配置一大堆东西了喵!) 每次创 ...
- Spring配置文件没有提示问题+log4j
1.Spring中引入schema约束,把约束文件引入Myeclipse (1)复制约束路径http://www.springframework.org/schema/beans/spring-bea ...
- Myeclipse中解决spring配置文件无提示问题
相信非常多人都遇到过在部署spring框架写spring的配置文件时无提示内容的问题,都是仅仅能提示一些标签 名,而无法提示属性值,bz我本人今天也遇到了这种问题.在网上找了非常久答案,非常多方法都不 ...
- 解决struts2配置文件没有提示的问题
1.在WEB-INF下新建一个dtd文件夹 2.将
- idea中解决spring配置文件命名空间(namespace)出现红色问题
在配置dubbo项目时,开始时经常出现dubbo错误,如下图: 修改方式已经出现在提示中了,具体这个更改: 1. 解压dubbo-2.5.4.jar这样的包(具体看你使用的版本),选择:META-IN ...
- Spring框架 全注解annotation不使用配置文件(SpringConfiguration.java类代替) 补充 xml配置文件没有提示解决
全注解不使用配置文件 首先还是倒包 在原有的jar包: 需Spring压缩包中的四个核心JAR包 beans .context.core 和expression 下载地址: https://pan.b ...
- spring学习(02)之配置文件没有提示问题
配置文件没有提示问题 1 spring引入schema约束,把约束文件引入到eclipse中 (1)复制约束路径 http://www.springframework.org/schema/beans ...
- 解决spring中不同配置文件中存在name或者id相同的bean可能引起的问题
小总结: 如果启用组件扫描,bean名称不同时,Spring将尝试创建一个bean,即使该类的bean已经在spring-config.xml中定义了. 但是,如果在spring配置文件中定义的bea ...
随机推荐
- Enigma模拟-Python
设计思想 Enigma机的机械结构: 键盘:加密人员通过键盘进行输入 转子:Enigma机上一般装有至少3个转轮.每个转轮有代表26个字母的触头和触点,触点和触头在转轮内部有导线相连(一个转轮相当于一 ...
- React 从入门到进阶之路(三)
之前的文章我们介绍了 React 创建组件.JSX 语法.绑定数据和绑定对象.接下来我们将介绍 React 绑定属性( 绑定class 绑定style).引入图片 循环数组渲染数据. 上一篇中我们 ...
- Trie[字典树] 数据结构及基本操作集
#include <iostream> #include <stdio.h> #include <cstring> #include <algorithm&g ...
- Ajax原生请求及Json基础
1.基本结构 <script type="text/javascript"> // 创建XMLHttpRequest对象 var request = new XMLHt ...
- GoWeb开发_Iris框架讲解(二):Get、Post、Put等请求及数据返回格式
数据请求方式的分类 所有的项目中使用的请求都遵循HTTP协议标准,HTTP协议经过了1.0和1.1两个版本的发展. HTTP1.0定义了三种请求方法: GET, POST 和 HEAD方法. HTTP ...
- kuangbin专题十二 HDU1029 Ignatius and the Princess IV (水题)
Ignatius and the Princess IV Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K ( ...
- C.0689-The 2019 ICPC China Shaanxi Provincial Programming Contest
We call a string as a 0689-string if this string only consists of digits '0', '6', '8' and '9'. Give ...
- php微信公众号开发简单记录
开发前准备:1.服务器 2.微信公众号测试号(有真实的账号更好) 测试号申请地址:https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/lo ...
- OnclickListener
https://developer.android.com/reference/android/view/View.OnClickListener.html# https://blog.csdn.ne ...
- PAT甲级——1099 Build A Binary Search Tree (二叉搜索树)
本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/90701125 1099 Build A Binary Searc ...