그것은 클라우드 스트림 프로젝트에 특정 단 2 라이브러리와 매우 간단 구현 될 것으로 보인다하지만 프로젝트
java.lang.ClassNotFoundException: org.springframework.integration.support.converter.ConfigurableCompositeMessageConverter
봄 부팅 : 봄 클라우드 스트림 카프카 구현
모든 종속성을 얻고 것은 다음과 같습니다
compile(
"org.springframework.boot:spring-boot-starter-web",
"org.springframework.boot:spring-boot-starter-actuator",
"org.springframework.boot:spring-boot-starter-data-rest",
"org.springframework.boot:spring-boot-starter-data-jpa",
"org.springframework.boot:spring-boot-starter-security",
"org.springframework.boot:spring-boot-starter-amqp",
"org.springframework.cloud:spring-cloud-stream",
"org.springframework.cloud:spring-cloud-starter-stream-kafka",
"org.postgresql:postgresql:9.4.1212.jre7",
"org.projectlombok:lombok:1.16.14",
"io.jsonwebtoken:jjwt:0.7.0",
"org.flywaydb:flyway-core:4.2.0"
)
클라우드 스트림 구성 :
spring.application.name=services
spring.stream.bindings.output.destination=appTopic
spring.stream.bindings.output.content-type=application/json
spring.stream.bindings.kafka.binder.zkNodes=${HOST}
spring.stream.bindings.kafka.binder.brokers=${HOST}
전체 build.grad 제작 :
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE")
classpath "gradle.plugin.com.boxfuse.client:flyway-release:4.2.0"
classpath "io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'org.flywaydb.flyway'
apply plugin: "io.spring.dependency-management"
ext {
springBootVersion = '1.5.2.RELEASE'
}
jar {
baseName = 'rest'
version = '0.1'
}
repositories {
mavenCentral()
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-stream-dependencies:Elmhurst.BUILD-SNAPSHOT'
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile(
"org.springframework.boot:spring-boot-starter-web",
"org.springframework.boot:spring-boot-starter-actuator",
"org.springframework.boot:spring-boot-starter-data-rest",
"org.springframework.boot:spring-boot-starter-data-jpa",
"org.springframework.boot:spring-boot-starter-security",
"org.springframework.boot:spring-boot-starter-amqp",
"org.springframework.cloud:spring-cloud-stream",
"org.springframework.cloud:spring-cloud-starter-stream-kafka",
"org.springframework.integration:spring-integration-core",
"org.postgresql:postgresql:9.4.1212.jre7",
"org.projectlombok:lombok:1.16.14",
"io.jsonwebtoken:jjwt:0.7.0",
"org.flywaydb:flyway-core:4.2.0"
)
testCompile(
"org.springframework.boot:spring-boot-starter-test",
"com.jayway.jsonpath:json-path",
"org.flywaydb.flyway-test-extensions:flyway-spring-test:4.2.0",
"io.rest-assured:rest-assured:3.0.3"
)
}
repositories {
maven {
url 'https://repo.spring.io/libs-snapshot'
}
}
'springBootVersion = '1.5.2.RELEASE'' –
스트림 버전이 너무 새 것처럼 보입니다. 1.2.x 여야합니다. –