Add Coroutines support for @Cacheable

This commit adds Coroutines support for `@Cacheable`.

It also refines SimpleKeyGenerator to ignore Continuation
parameters (Kotlin does not allow to have the same method
signature with both suspending and non-suspending variants)
and refines
org.springframework.aop.framework.CoroutinesUtils.awaitSingleOrNull
in order to wrap plain value to Mono.

Closes gh-31412
This commit is contained in:
Sébastien Deleuze
2023-10-15 19:11:13 +02:00
parent 39a282e463
commit 466c8d8f23
9 changed files with 270 additions and 9 deletions

View File

@@ -30,6 +30,7 @@ dependencies {
optional("org.hibernate:hibernate-validator")
optional("org.jetbrains.kotlin:kotlin-reflect")
optional("org.jetbrains.kotlin:kotlin-stdlib")
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
optional("org.reactivestreams:reactive-streams")
testFixturesApi("org.junit.jupiter:junit-jupiter-api")
testFixturesImplementation(testFixtures(project(":spring-beans")))