File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
async/src/main/java/info/xiaomo/anysc Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,7 @@ class TestController
29
29
@Autowired constructor (private val task: AsyncTask ) {
30
30
31
31
@RequestMapping(value = " /" , method = arrayOf(RequestMethod .GET ))
32
- @Throws(Exception ::class )
33
- fun task (): Result <* > {
32
+ fun task (): Result <Long > {
34
33
val start = System .currentTimeMillis()
35
34
36
35
val task1 = task.doTaskOne()
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import java.util.concurrent.Future
13
13
open class AsyncTask {
14
14
15
15
@Async
16
- @Throws(Exception ::class )
17
16
open fun doTaskOne (): Future <String > {
18
17
println (" 开始做任务一" )
19
18
val start = System .currentTimeMillis()
@@ -24,7 +23,6 @@ open class AsyncTask {
24
23
}
25
24
26
25
@Async
27
- @Throws(Exception ::class )
28
26
open fun doTaskTwo (): Future <String > {
29
27
println (" 开始做任务二" )
30
28
val start = System .currentTimeMillis()
@@ -35,7 +33,6 @@ open class AsyncTask {
35
33
}
36
34
37
35
@Async
38
- @Throws(Exception ::class )
39
36
open fun doTaskThree (): Future <String > {
40
37
println (" 开始做任务三" )
41
38
val start = System .currentTimeMillis()
You can’t perform that action at this time.
0 commit comments