2022-09-02 23:29:24 +08:00
|
|
|
plugins {
|
|
|
|
id 'org.springframework.build.runtimehints-agent'
|
|
|
|
}
|
|
|
|
|
2017-08-21 20:41:55 +08:00
|
|
|
description = "Spring Context"
|
|
|
|
|
2019-08-21 02:26:43 +08:00
|
|
|
apply plugin: "kotlin"
|
2017-08-21 20:41:55 +08:00
|
|
|
|
|
|
|
dependencies {
|
2021-05-22 03:16:30 +08:00
|
|
|
api(project(":spring-aop"))
|
|
|
|
api(project(":spring-beans"))
|
|
|
|
api(project(":spring-core"))
|
|
|
|
api(project(":spring-expression"))
|
2023-06-19 14:55:08 +08:00
|
|
|
api("io.micrometer:micrometer-observation")
|
2017-08-21 20:41:55 +08:00
|
|
|
optional(project(":spring-instrument"))
|
2024-02-12 09:34:17 +08:00
|
|
|
optional("io.micrometer:context-propagation")
|
2023-08-02 07:04:31 +08:00
|
|
|
optional("io.projectreactor:reactor-core")
|
2021-09-17 15:14:07 +08:00
|
|
|
optional("jakarta.annotation:jakarta.annotation-api")
|
|
|
|
optional("jakarta.ejb:jakarta.ejb-api")
|
|
|
|
optional("jakarta.enterprise.concurrent:jakarta.enterprise.concurrent-api")
|
|
|
|
optional("jakarta.inject:jakarta.inject-api")
|
|
|
|
optional("jakarta.interceptor:jakarta.interceptor-api")
|
|
|
|
optional("jakarta.validation:jakarta.validation-api")
|
2023-07-09 22:52:17 +08:00
|
|
|
optional("javax.annotation:javax.annotation-api")
|
2023-08-22 19:47:21 +08:00
|
|
|
optional("javax.inject:javax.inject")
|
2021-09-21 23:07:42 +08:00
|
|
|
optional("javax.money:money-api")
|
2022-02-05 04:01:02 +08:00
|
|
|
optional("org.apache.groovy:groovy")
|
2020-04-08 00:06:43 +08:00
|
|
|
optional("org.apache-extras.beanshell:bsh")
|
2023-08-02 05:52:48 +08:00
|
|
|
optional("org.aspectj:aspectjweaver")
|
2023-05-03 22:01:41 +08:00
|
|
|
optional("org.crac:crac")
|
2021-09-17 15:14:07 +08:00
|
|
|
optional("org.hibernate:hibernate-validator")
|
2019-07-19 16:20:35 +08:00
|
|
|
optional("org.jetbrains.kotlin:kotlin-reflect")
|
|
|
|
optional("org.jetbrains.kotlin:kotlin-stdlib")
|
2023-10-16 01:11:13 +08:00
|
|
|
optional("org.jetbrains.kotlinx:kotlinx-coroutines-core")
|
2019-07-05 22:19:23 +08:00
|
|
|
optional("org.reactivestreams:reactive-streams")
|
2023-08-02 06:56:50 +08:00
|
|
|
testFixturesApi("org.junit.jupiter:junit-jupiter-api")
|
|
|
|
testFixturesImplementation(testFixtures(project(":spring-beans")))
|
|
|
|
testFixturesImplementation("com.google.code.findbugs:jsr305")
|
2023-11-20 22:24:40 +08:00
|
|
|
testFixturesImplementation("io.projectreactor:reactor-test")
|
2023-08-02 06:56:50 +08:00
|
|
|
testFixturesImplementation("org.assertj:assertj-core")
|
2022-09-05 22:21:17 +08:00
|
|
|
testImplementation(project(":spring-core-test"))
|
2021-05-22 03:16:30 +08:00
|
|
|
testImplementation(testFixtures(project(":spring-aop")))
|
|
|
|
testImplementation(testFixtures(project(":spring-beans")))
|
|
|
|
testImplementation(testFixtures(project(":spring-core")))
|
2023-07-09 22:52:17 +08:00
|
|
|
testImplementation("jakarta.inject:jakarta.inject-tck")
|
2023-08-02 06:56:50 +08:00
|
|
|
testImplementation("org.apache.commons:commons-pool2")
|
2022-02-05 04:01:02 +08:00
|
|
|
testImplementation("org.apache.groovy:groovy-jsr223")
|
|
|
|
testImplementation("org.apache.groovy:groovy-xml")
|
2021-05-22 03:16:30 +08:00
|
|
|
testImplementation("org.awaitility:awaitility")
|
2023-01-31 16:41:47 +08:00
|
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-core")
|
Support `@Scheduled` fixedDelay/fixedRate on Publisher-returning methods
This commit adds support for `@Scheduled` annotation on reactive
methods and Kotlin suspending functions.
Reactive methods are methods that return a `Publisher` or a subclass
of `Publisher`. The `ReactiveAdapterRegistry` is used to support many
implementations, such as `Flux`, `Mono`, `Flow`, `Single`, etc.
Methods should not take any argument and published values will be
ignored, as they are already with synchronous support.
This is implemented in `ScheduledAnnotationReactiveSupport`, which
"converts" Publishers to `Runnable`. This strategy keeps track of
active Subscriptions in the `ScheduledAnnotationBeanPostProcessor`,
in order to cancel them all in case of shutdown.
The existing scheduling support for tasks is reused, aligning the
triggering behavior with the existing support: cron, fixedDelay and
fixedRate are all supported strategies.
If the `Publisher` errors, the exception is logged at warn level and
otherwise ignored. As a result new `Runnable` instances will be
created for each execution and scheduling will continue.
The only difference with synchronous support is that error signals
will not be thrown by those `Runnable` tasks and will not be made
available to the `org.springframework.util.ErrorHandler` contract.
This is due to the asynchronous and lazy nature of Publishers.
Closes gh-23533
Closes gh-28515
2023-06-05 18:25:15 +08:00
|
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
|
|
|
|
testImplementation("io.reactivex.rxjava3:rxjava")
|
2023-06-19 14:55:08 +08:00
|
|
|
testImplementation('io.micrometer:context-propagation')
|
|
|
|
testImplementation("io.micrometer:micrometer-observation-test")
|
2021-09-17 15:14:07 +08:00
|
|
|
testRuntimeOnly("jakarta.xml.bind:jakarta.xml.bind-api")
|
|
|
|
testRuntimeOnly("org.glassfish:jakarta.el")
|
2020-02-06 19:59:55 +08:00
|
|
|
// Substitute for javax.management:jmxremote_optional:1.0.1_04 (not available on Maven Central)
|
2021-05-22 03:16:30 +08:00
|
|
|
testRuntimeOnly("org.glassfish.external:opendmk_jmxremote_optional_jar")
|
|
|
|
testRuntimeOnly("org.javamoney:moneta")
|
|
|
|
testRuntimeOnly("org.junit.vintage:junit-vintage-engine") // for @Inject TCK
|
2017-09-23 17:28:19 +08:00
|
|
|
}
|