我们使用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. List、Set

    List.Set List.Set List.Set List.Set List.Set List.Set List.Set

  2. [USACO07DEC]观光奶牛Sightseeing Cows 二分答案+判断负环

    题目描述 Farmer John has decided to reward his cows for their hard work by taking them on a tour of the ...

  3. linux下find查找与批量替换文件中指定内容

    经常在部署tomcat时需要替换配置文件中的ip,find命令批量替换还是很方便的 查找需要替换的ip,看看哪些文件有配置这个ip,执行下面命令: find ./ -type f -regex &qu ...

  4. springboot和Druid整合配置数据源

    @Configuration public class DruidConfiguration { @ConfigurationProperties(prefix = "spring.data ...

  5. avro-maven-plugin

    <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://mave ...

  6. docker jvm 占用高的问题定位

    定位流程 先使用一些轻便的工具查看总体情况, 如果情况糟糕, 再使用重量级的工具 jstack       查看线程数是否过多 jstat -gc -gcutil 查看gc次数和时间是否过多, 各个分 ...

  7. RMAN restore fails with ORA-01180: can not create datafile 1 (文档 ID 1265151.1)

    http://blog.itpub.net/26655292/viewspace-2131269/ ########Q&A issue1:ORA-01180: can not create d ...

  8. bzoj 3732: Network 树上两点边权最值

    http://www.lydsy.com/JudgeOnline/problem.php?id=3732 首先想到,要使得最长边最短,应该尽量走最短的边,在MST上. 然后像LCA那样倍增娶个最大值 ...

  9. python3+Appium自动化03-Appium元素检测

    需要导入方法NoSuchElementException from appium import webdriver from selenium.common.exceptions import NoS ...

  10. postgresql安装,java简单使用postgresql

    一 整合 由于本人的学过的技术太多太乱了,于是决定一个一个的整合到一个springboot项目里面. 附上自己的github项目地址 https://github.com/247292980/spri ...