diff --git a/build.gradle b/build.gradle index 5436ace641..effc13b65e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlinVersion = '1.2.40' + ext.kotlinVersion = '1.2.41' repositories { maven { url 'https://repo.spring.io/plugins-release' } } @@ -8,6 +8,7 @@ buildscript { classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.3' classpath 'me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" + classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion" } } @@ -236,6 +237,7 @@ project('spring-rabbit') { description = 'Spring RabbitMQ Support' apply plugin: 'kotlin' + apply plugin: 'kotlin-spring' dependencies { diff --git a/spring-rabbit/src/test/kotlin/org/springframework/amqp/rabbit/annotation/EnableRabbitKotlinTests.kt b/spring-rabbit/src/test/kotlin/org/springframework/amqp/rabbit/annotation/EnableRabbitKotlinTests.kt index 355718800d..a122e04b00 100644 --- a/spring-rabbit/src/test/kotlin/org/springframework/amqp/rabbit/annotation/EnableRabbitKotlinTests.kt +++ b/spring-rabbit/src/test/kotlin/org/springframework/amqp/rabbit/annotation/EnableRabbitKotlinTests.kt @@ -57,7 +57,7 @@ class EnableRabbitKotlinTests { @Configuration @EnableRabbit - open class Config { + class Config { val latch = CountDownLatch(1) @@ -67,17 +67,18 @@ class EnableRabbitKotlinTests { } @Bean - open fun rabbitListenerContainerFactory(cf: CachingConnectionFactory): SimpleRabbitListenerContainerFactory { + fun rabbitListenerContainerFactory(cf: CachingConnectionFactory): SimpleRabbitListenerContainerFactory { val factory = SimpleRabbitListenerContainerFactory() factory.setConnectionFactory(cf) return factory } @Bean - open fun cf(): CachingConnectionFactory { + fun cf(): CachingConnectionFactory { return CachingConnectionFactory( RabbitAvailableCondition.getBrokerRunning().connectionFactory) } + } }