下面的导入在我的代码中不被识别:
org.springframework.integration.http.support.DefaultHttpHeaderMapper
org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandler我想在代码中使用HttpRequestExecutingMessageHandler和DefaultHttpHeaderMapper,但它无法识别。
在我的gradle文件中有下面的依赖项
buildscript {
ext {
springBootVersion = '1.5.2.RELEASE'
}
repositories {
jcenter()
mavenCentral()
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('org.springframework.build.gradle:propdeps-plugin:0.0.7')
classpath 'org.ajoberstar:gradle-git:1.7.0'
}
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-actuator-docs')
compile('org.springframework.boot:spring-boot-starter-integration')
compile('org.springframework.boot:spring-boot-starter-activemq')
compile('org.springframework.boot:spring-boot-starter-batch')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-cache')
compile('javax.cache:cache-api')
compile('org.ehcache:ehcache:3.+')
compile('org.springframework.cloud:spring-cloud-starter-aws')
compile('com.h2database:h2')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-validation')
compile('org.springframework.retry:spring-retry')
compile "org.apache.commons:commons-lang3:3.4"
compile('commons-codec:commons-codec:1.10')
compile('com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.6.+')
compile 'org.apache.httpcomponents:httpclient:4.5.+'
compile 'org.codehaus.woodstox:woodstox-core-asl:4.4.+'
compile 'com.amazonaws:aws-java-sdk-bom:1.11.115'
compile 'com.amazonaws:aws-java-sdk-s3'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
optional('org.springframework.boot:spring-boot-configuration-processor')
optional('org.springframework.boot:spring-boot-devtools')
}我应该使用任何其他导入,还是任何依赖项的版本应该不同?请给我建议。
发布于 2017-06-16 19:30:52
看来你错过了这个:
compile('org.springframework.integration:spring-integration-http')缺省情况下,Spring不提供这种依赖。
https://stackoverflow.com/questions/44596479
复制相似问题