首页>代码>spring通过@Async注解实现异步执行Service方法并且通过Java Future对象得到执行结果>/spring-async-future-example/src/main/java/com/memorynotfound/AppConfig.java
package com.memorynotfound; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.EnableAsync; @EnableAsync @Configuration @ComponentScan("com.memorynotfound") public class AppConfig { }
![](https://static.zuidaima.com/resource/img/heart_ico.png)
wanyuan123 LV2
2021年1月5日