Use 'kotlin-spring' gradle plugin
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user