-
Notifications
You must be signed in to change notification settings - Fork 26.5k
With @Reference, Aop does not work #5446
Copy link
Copy link
Closed
Milestone
Description
- I have searched the issues of this repository and believe that this is not a duplicate.
- I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 2.6.0
- Operating System version: windows10
- Java version: 1.8
Steps to reproduce this issue
When an Aop pointcut is an interface:
- With @reference, Aop does not work
- Using XML with @autowire, Aop works fine
当Aop切入点是接口时:
- 使用@reference,Aop不生效
- 使用xml配合@Autowired,Aop正常工作
Pls. provide [GitHub address] to reproduce this issue.
package com.xxxx.service;
public interface XxxxService {
DicResponseDTO<List<String>> getAllFormKey();
}
-------------------------
@Aspect
@Component
public class XxxAspect {
@Around("execution(* com.xxxx.service.*.*(..))")
public Object aroundApi(ProceedingJoinPoint pjp) throws Throwable {
}
}
-------------------------------------
@RestController
public class TestController {
/**
*<dubbo:reference interface="com.xxxx.service.XxxxService" id="xxxService" check="false"
* timeout="5000" retries="-1"/>
**/
@Autowired
private XxxxService xxxxService;
@Reference
private XxxxService xxxxServiceRe;
@RequestMapping("test")
public void ss() {
Object allFormKey =
xxxxService.getAllFormKey();
}
}
Expected Result
What do you expected from the above steps?
Expectation: With @reference, Aop works fine
期望:使用@reference,Aop能正常工作
Actual Result
What actually happens?
With @reference, Aop does not work
使用@reference,Aop不生效
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.