applicationContext.xml 配置文件html
查找约束路径信息 spring
从文档里找 spring-framework-4.2.8.RELEASE\docs\spring-framework-reference 四选一app
如:\html\xsd-configuration.htmlspa
基础配置(仅仅bean约束配置,AOP 事务等其余没配)code
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <!-- bean definitions here --> </beans>
无语法提示解决方法:连约束xml
window > Preferences > 搜xml 选“XML Catalog” >Add htm
key type:选 URI事务
Key:粘贴入 http://www.springframework.org/schema/beans/spring-beans.xsd文档
File System 按钮 找到Spring包里的文件it
如:........ spring-framework-4.2.8.RELEASE\schema\beans
选中spring-beans-s.2.xsd
而后配置bean时就有提示了,就能够自动补全,查看可配置标签了。