<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/incubator-dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/incubator-dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.0</li>
<li>Operating System version: macos</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">functions</h3>
<ol dir="auto">
<li>Upgrade  junit to junit 5</li>
<li>Upgrade the test cases</li>
</ol>
<h3 dir="auto">Why do this ?</h3>
<ul dir="auto">
<li>Some new features：test extensions 、Future of JVM testing、easier parameterized tests</li>
<li>Java 8 lambda support</li>
<li>Optimized api</li>
<li>Basically compatible with junit4</li>
</ul>
<p dir="auto">Please read the referenced article <a href="http://dolszewski.com/testing/7-reasons-why-you-should-start-using-junit-5-today/" rel="nofollow">《7 reasons why you should start using JUnit 5 today》</a></p>
<h3 dir="auto">How to write junit5 test case ?</h3>
<p dir="auto">Please see 《JUnit 5 User Guide》 : <a href="https://junit.org/junit5/docs/current/user-guide/" rel="nofollow">https://junit.org/junit5/docs/current/user-guide/</a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.6.0</li>
<li>Operating System version: windows10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">When an Aop pointcut is an interface:</p>
<ol dir="auto">
<li>With <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>, Aop does not work</li>
<li>Using XML with <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/autowire/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/autowire">@autowire</a>, Aop works fine</li>
</ol>
<p dir="auto">当Aop切入点是接口时：</p>
<ol dir="auto">
<li>使用<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>，Aop不生效</li>
<li>使用xml配合<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Autowired/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Autowired">@Autowired</a>，Aop正常工作</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package com.xxxx.service;
public interface XxxxService {
    DicResponseDTO&lt;List&lt;String&gt;&gt; getAllFormKey();
}

-------------------------

@Aspect
@Component
public class XxxAspect {
   @Around(&quot;execution(* com.xxxx.service.*.*(..))&quot;)
    public Object aroundApi(ProceedingJoinPoint pjp) throws Throwable {
    }
}

-------------------------------------

@RestController
public class TestController {

    /**
    *&lt;dubbo:reference interface=&quot;com.xxxx.service.XxxxService&quot; id=&quot;xxxService&quot; check=&quot;false&quot;
    *                     timeout=&quot;5000&quot; retries=&quot;-1&quot;/&gt;
    **/
    @Autowired
    private XxxxService xxxxService;

    @Reference
    private XxxxService xxxxServiceRe;

    @RequestMapping(&quot;test&quot;)
    public void ss() {
        Object allFormKey =
                xxxxService.getAllFormKey();
    }
}"><pre class="notranslate"><code class="notranslate">package com.xxxx.service;
public interface XxxxService {
    DicResponseDTO&lt;List&lt;String&gt;&gt; getAllFormKey();
}

-------------------------

@Aspect
@Component
public class XxxAspect {
   @Around("execution(* com.xxxx.service.*.*(..))")
    public Object aroundApi(ProceedingJoinPoint pjp) throws Throwable {
    }
}

-------------------------------------

@RestController
public class TestController {

    /**
    *&lt;dubbo:reference interface="com.xxxx.service.XxxxService" id="xxxService" check="false"
    *                     timeout="5000" retries="-1"/&gt;
    **/
    @Autowired
    private XxxxService xxxxService;

    @Reference
    private XxxxService xxxxServiceRe;

    @RequestMapping("test")
    public void ss() {
        Object allFormKey =
                xxxxService.getAllFormKey();
    }
}
</code></pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<p dir="auto">Expectation: With <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>, Aop works fine<br>
期望：使用<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>，Aop能正常工作</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">With <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>, Aop does not work<br>
使用<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a>，Aop不生效</p>