当前位置:编程学习 > JAVA >>

spring的schema怎么配置

我在写spring的时候需要用注解,使用的myeclipes自带的spring3.0.但是我配置了schema却没有给提示。
<context>和<tx>都没有提示。求解答
<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd 
http://www.springframework.org/schema/tx 
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
http://www.springframework.org/schema/aop  
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> --------------------编程问答-------------------- 需要提示可以这样
xsi:schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context/spring-context-3.0.xsd  
http://www.springframework.org/schema/context/spring-context-3.0.xsd 
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd  
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd 
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd  
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
但是启动服务器的时候需要把它便会原来的样子。要提示就加上。不过我认为还是多加练习为好,最好能达到不须提示能够正确配置。 --------------------编程问答-------------------- 你没有指定xmlns,content、tx、aop都要有。否则xsi无法进行装载的。
补充:Java ,  Java EE
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,