2
我在Spring中嘗試使用Spring 3.2中的AspectJ來開始我的旅程。我正在追蹤書「春天在行動」。筆者使用的AspectJ通過導入AspectJ的包是這樣的:但是使用Spring找不到AspectJ軟件包
import org.aspectj.lang.annotation.Aspect
給我留下了
package org.aspectj.lang.annotation does not exist
我試圖導入aspectj.jars(1.8.4版本)我在NetBeans庫,沒有任何影響。我只有彈簧框打開3.2.3釋放xxxxxx的罐子。它仍然沒有找到包。什麼可能導致這個問題?這裏是我的beans.xml的beggining
<?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:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
" xmlns:util="http://www.springframework.org/schema/util">
<context:component-scan base-package="heyspring">
</context:component-scan>
<aop:aspectj-autoproxy>