Skip to content

Commit 6f1a3d8

Browse files
committed
add tag
1 parent eeebb65 commit 6f1a3d8

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

async/src/main/java/info/xiaomo/anysc/controller/TestController.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class TestController
2929
@Autowired constructor(private val task: AsyncTask) {
3030

3131
@RequestMapping(value = "/", method = arrayOf(RequestMethod.GET))
32-
@Throws(Exception::class)
33-
fun task(): Result<*> {
32+
fun task(): Result<Long> {
3433
val start = System.currentTimeMillis()
3534

3635
val task1 = task.doTaskOne()

async/src/main/java/info/xiaomo/anysc/task/AsyncTask.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import java.util.concurrent.Future
1313
open class AsyncTask {
1414

1515
@Async
16-
@Throws(Exception::class)
1716
open fun doTaskOne(): Future<String> {
1817
println("开始做任务一")
1918
val start = System.currentTimeMillis()
@@ -24,7 +23,6 @@ open class AsyncTask {
2423
}
2524

2625
@Async
27-
@Throws(Exception::class)
2826
open fun doTaskTwo(): Future<String> {
2927
println("开始做任务二")
3028
val start = System.currentTimeMillis()
@@ -35,7 +33,6 @@ open class AsyncTask {
3533
}
3634

3735
@Async
38-
@Throws(Exception::class)
3936
open fun doTaskThree(): Future<String> {
4037
println("开始做任务三")
4138
val start = System.currentTimeMillis()

0 commit comments

Comments
 (0)