title: how to resolve Spring boot @EnableAsync and @Async problem?
body: <p>my service:</p>
  
  <pre><code>@Service
  public class ForgetService{
     @Async
     public CompletableFuture&lt;Object&gt; getTokenService() {
         Map&lt;String, Object&gt; map = new HashMap&lt;&gt;(8);
         map.put("status", ErrorEnum.TOKEN_SUSSCESS.getStatus());
         map.put("message", ErrorEnum.TOKEN_SUSSCESS.getMessage());
         return CompletableFuture.completedFuture(map); 
     }
  }
  </code></pre>
  
  <p>my controller:</p>
  
  <pre><code>@RestController
  public class ForgetController {
     private final ForgetService forgetService;
     @Autowired
     private ForgetController(ForgetService forgetService) {
         this.forgetService = forgetService;
     }
     @PostMapping(value = "/forget/token")
     @Async
     public CompletableFuture&lt;Object&gt; getTokenController() {
         return CompletableFuture.completedFuture(forgetService.getTokenService());
  }
  </code></pre>
  
  <p>}</p>
  
  <p>spring boot application class:</p>
  
  <pre><code>@SpringBootApplication
  @EnableAsync
  public class ApitestApplication {
     public static void main(String[] args) {
         SpringApplication.run(ApitestApplication.class, args);
     }
  }
  </code></pre>
  
  <hr>
  
  <p>when i run my application, console log :</p>
  
  <p>The bean 'forgetService' could not be injected as a 'com.apitest.service.ForgetService' because it is a JDK dynamic proxy that implements:
      com.apitest.inf.ForgetServiceInf</p>
  
  <p>Action:</p>
  
  <p>Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableCaching.</p>
  
  <hr>
  
  <p><strong>i tried setting 'spring.aop.proxy-target-class=true' in application.properties and setting '@EnableAsync(proxyTargetClass=true), but it's useless,so what's wrong?  how to resolve it?</strong></p>