我们使用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配置文件没有提示的问题的更多相关文章

  1. 解决Spring配置文件不显示design和source, namespace 问题

    之前撸代码一直没太关注这个问题,后来发现对于不太熟悉配置文件内容的小伙伴们来说是比较痛苦的,因为每个配置项都需要你记住或者拷贝别人现成配置 那么问题来了,今天在写发现我的Spring配置文件不显示de ...

  2. 通过IDEA解决spring配置文件

    来自:https://blog.csdn.net/yanghanxiu/article/details/79366263 (其实尼可以使用springboot 这样就不用配置一大堆东西了喵!) 每次创 ...

  3. Spring配置文件没有提示问题+log4j

    1.Spring中引入schema约束,把约束文件引入Myeclipse (1)复制约束路径http://www.springframework.org/schema/beans/spring-bea ...

  4. Myeclipse中解决spring配置文件无提示问题

    相信非常多人都遇到过在部署spring框架写spring的配置文件时无提示内容的问题,都是仅仅能提示一些标签 名,而无法提示属性值,bz我本人今天也遇到了这种问题.在网上找了非常久答案,非常多方法都不 ...

  5. 解决struts2配置文件没有提示的问题

    1.在WEB-INF下新建一个dtd文件夹 2.将

  6. idea中解决spring配置文件命名空间(namespace)出现红色问题

    在配置dubbo项目时,开始时经常出现dubbo错误,如下图: 修改方式已经出现在提示中了,具体这个更改: 1. 解压dubbo-2.5.4.jar这样的包(具体看你使用的版本),选择:META-IN ...

  7. Spring框架 全注解annotation不使用配置文件(SpringConfiguration.java类代替) 补充 xml配置文件没有提示解决

    全注解不使用配置文件 首先还是倒包 在原有的jar包: 需Spring压缩包中的四个核心JAR包 beans .context.core 和expression 下载地址: https://pan.b ...

  8. spring学习(02)之配置文件没有提示问题

    配置文件没有提示问题 1 spring引入schema约束,把约束文件引入到eclipse中 (1)复制约束路径 http://www.springframework.org/schema/beans ...

  9. 解决spring中不同配置文件中存在name或者id相同的bean可能引起的问题

    小总结: 如果启用组件扫描,bean名称不同时,Spring将尝试创建一个bean,即使该类的bean已经在spring-config.xml中定义了. 但是,如果在spring配置文件中定义的bea ...

随机推荐

  1. OC官方文档翻译-Values-and-Collections-值与集合类型

    查看全部文档翻译,请浏览https://github.com/L1l1thLY/Programming-with-Objective-C-in-Chinese,blog仅收录本人翻译的两章. 简述 O ...

  2. win10外接显示器时有些应用和里面的字体显示比较模糊

    打开系统设置 - 选择显示 - 选中外接的显示器 - 点击 "高级缩放设置" 进去后将 "允许 Windows  尝试修改应用,使其不模糊"打开,然后关闭应用再 ...

  3. Codeforces Round #527 (Div. 3)F(DFS,DP)

    #include<bits/stdc++.h>using namespace std;const int N=200005;int n,A[N];long long Mx,tot,S[N] ...

  4. ARC085F(动态规划,线段树)

    #include<bits/stdc++.h>using namespace std;const int maxn = 0x3f3f3f3f;int mn[801000];int cost ...

  5. 洛谷P3478 [POI2008]STA-Station

    P3478 [POI2008]STA-Station 题目描述 The first stage of train system reform (that has been described in t ...

  6. this android sdk requires android developer toolkit version

    this android sdk requires android developer toolkit version 10.0.0 or above. current version is 8.0. ...

  7. SpringBoot2.0 基础案例(04):定时任务和异步任务的使用方式

    一.定时任务 1.基本概念 按照指定时间执行的程序. 2.使用场景 数据分析 数据清理 系统服务监控 二.同步和异步 1.基本概念 同步调用 程序按照代码顺序依次执行,每一行程序都必须等待上一行程序执 ...

  8. IOS 关于tableview中cell的长按手势

    说明:虽然是tableview中cell的长按手势  但是手势是添加在tableview上的 UILongPressGestureRecognizer *longpress = [[UILongPre ...

  9. nodejs安装及使用步骤详解

    就一段小小的时间不用,就忘得差不多了,果然好记性不如乱笔头. 1.必须要安装node环境(建议装在C盘,这是一个系统盘)+安装mongoose数据库  +Robot 3T之于mongodb就相当于so ...

  10. MD5Utils

    import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import com.yundae ...