在spring配置文件中要配置aop的时候,“<”号打上后没有出现aop标签我只加入了
* SPRING_HOME/dist/spring.jar
* SPRING_HOME/lib/jakarta-commons/commons-logging.jar
* SPRING_HOME/lib/log4j/log4j-1.2.14.jar
* SPRING_HOME/lib/aspectj/*.jar
这些jar,是不是还需要别的jar

解决方案 »

  1.   

    <beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         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/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
               http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    或者<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    有吗
      

  2.   

    跟jar包没有多大关系,你要在myeclipse中配置一下:
    以myeclipse5.5为例:
    进入:window -> Preference... -> MyEclipse -> Files and Editors -> XML ->XML Catalog
    右侧选中“User Specified Entries”,点击“Add...”按钮,
    Key Type选择URI
    location项中右侧有个下拉箭头,点击选择File System...再选择SPRING_HOME\dist\resources\spring-beans-2.0.xsd文件,
    选择后再将Key Type改为Schema Location点击ok后重新打开xml文件就有提示了
      

  3.   



    上面是配置bean标签的,如果配置aop标签,按照下面:
    跟jar包没有多大关系,你要在myeclipse中配置一下: 
    以myeclipse5.5为例: 
    进入:window -> Preference... -> MyEclipse -> Files and Editors -> XML ->XML Catalog 
    右侧选中“User Specified Entries”,点击“Add...”按钮, 
    Key Type选择URI 
    location项中右侧有个下拉箭头,点击选择File System...再选择SPRING_HOME\dist\resources\spring-aop-2.0.xsd文件, 
    选择后再将Key Type改为Schema Location点击ok后重新打开xml文件就有提示了
      

  4.   

    看xml中的schema是否引入
    最重要的是http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd是否在里面,没有就加上请不要拷贝和你用的spring.jar版本不同的applicationContext.xml