关于Spring中在applicationContext.xml中AOP(aop:aspectj-autoproxy)的配置问题记录:

在学习Spring AOP时,遇到在`applicationContext.xml`中配置`aop:aspectj-autoproxy`的问题,导致运行测试类时出错。通过参考博客解决了问题,关键在于在`xsi:schemaLocation`中添加aop的xsd文件引用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

关于Spring中在applicationContext.xml中AOP(aop:aspectj-autoproxy)的配置问题记录:

1.问题描述:今日学习spring中AOP功能,在此做参考了下面链接的博主的一个test:

https://blog.csdn.net/guoyp2126/article/details/116090411
1.1在com.example.service

package com.example.service;

public interface CustomerService {
   
   
    void play();
}

1.2com.example.service.impl

package com.example.service.impl;

import com.example.service.CustomerService;
import org.springframework.stereotype.Component;

@Component(value = "customer")
public class CustomerServiceImpl implements CustomerService {
   
   

    @Override
    public void play() {
   
   
        System
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值