gpt4 book ai didi

java - 在哪里可以找到 org.springframework.cassandra.config jar。我看到的只是 org.springframework.data.cassandra

转载 作者:行者123 更新时间:2023-12-02 10:32:34 26 4
gpt4 key购买 nike

让 gradle 构建正常工作( from a previous question related to this one ),安迪·威尔金森(Andy Wilkinson)为我回答,没有问题。正在为 Cassandra 寻找一个单独的 org.springframework 包...

我找不到以下内容:

org.springframework.cassandra.config.CassandraCqlClusterFactoryBean;并导入

org.springframework.cassandra.core.keyspace.CreateKeyspaceSpecification;

我一直发现的只是进口我已经有了 org.springframework.data.cassandra 。问题是 core.keyspace.CreateKeySpaceSpefication 和 config.CassandraCqlClusterFactoryBean 不存在。

尽管我需要的软件包仍然受支持,但我一直在互联网上搜索,但没有运气。这就是我可能需要马塞洛帮助的地方。一旦我有了这个,所有的 PFS 项目都会构建起来,我们就会处于良好的状态。

显然,社区被迫使用“org.springframework.data.cassandra”,该项目中没有出现以下内容:
CassandraCqlClusterFactoryBean 对于上面的,它是 CassandraClusterFactoryBean; (没有 Cql)这是我的问题。

以下函数无法编译,因为 data.cassandra 版本上不存在我需要的方法

public CassandraCqlClusterFactoryBean cluster() {
CassandraCqlClusterFactoryBean cqlClusterFactoryBean = new CassandraCqlClusterFactoryBean();
cqlClusterFactoryBean.setContactPoints(properties.getContactPoints());
cqlClusterFactoryBean.setPort(properties.getPort());
cqlClusterFactoryBean.setUsername(properties.getUsername());
cqlClusterFactoryBean.setPassword(properties.getPassword());
cqlClusterFactoryBean.setKeyspaceCreations(getKeyspaceCreations());
cqlClusterFactoryBean.setQueryOptions(getQueryOptions());
return cqlClusterFactoryBean;
}

Andy 还提出的建议是我不应该将这些 jar 文件放在/jdk/jre/lib 文件夹中。如果是这种情况,并且导入不起作用,我应该将 jar 文件放在哪里才能正确构建项目?

我以前使用过 JAVA,并为 CISCO Appliance 构建了一个简单的 JAVA 代码库,并且所有导入都工作得很好!

我们正在使用 Gradle 构建此项目,这是我的 Gradle 文件供引用,该文件在 Andy Wilkinson 的帮助下工作。

buildscript {
ext {
springBootVersion = '1.5.17.RELEASE'
}
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
//apply plugin: 'war'

version = '0.0.1'
sourceCompatibility = 1.8

repositories {
jcenter()
mavenCentral()
flatDir {
dirs 'repository'
}
mavenCentral()
}



ext {
springCloudVersion = 'Edgware.SR3'
}

dependencies {
compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.springframework.boot:spring-boot-devtools")
compile('org.springframework.boot:spring-boot-starter-actuator')

compile group: 'joda-time', name: 'joda-time'

compile group: 'com.myproject', name: 'all_pfs', version: '7.1.9'
compile group: 'com.myproject', name: 'pfs-client', version: '7.1.9'
compile group: 'com.myproject.pfs.wic', name: 'pfs-wic', version: '1.1.0.RC3'
compile group: 'com.picketlink.picketlink', name: 'picketlink-fed', version: '2.0.3-SNAPSHOT'

compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'org.apache.httpcomponents', name: 'httpclient'
compile group: 'xstream', name: 'xstream', version: '1.2.2'
compile group: 'javax.ejb', name: 'javax.ejb-api', version: '3.2'

compile group: 'io.springfox', name: 'springfox-swagger2', version:'2.6.1'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.6.1'

// https://mvnrepository.com/artifact/org.apache.commons/commons-io
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'

// https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils
compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.8.3'



// https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl
compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.13'



// https://mvnrepository.com/artifact/org.springframework/spring-messaging
compile group: 'org.springframework', name: 'spring-messaging', version: '4.2.6.RELEASE'


// https://mvnrepository.com/artifact/org.springframework/spring-websocket
compile group: 'org.springframework', name: 'spring-websocket', version: '4.3.11.RELEASE'

// https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox
compile group: 'org.apache.pdfbox', name: 'pdfbox', version: '2.0.11'

// compile ("org.springframework.boot:spring-boot-starter-data-elasticsearch")
// compile ("net.java.dev.jna:jna:4.1.0")


compile('org.springframework.boot:spring-boot-starter-test')

// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.5.6.RELEASE'


// https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4
testCompile group: 'com.microsoft.sqlserver', name: 'sqljdbc4', version: '4.0'

compile name: "sqljdbc4-4.0"

//Added to implement slf4j logger
compile group: 'org.slf4j', name:'slf4j-api', version: '1.7.2'
//compile group: 'ch.qos.logback', name:'logback-classic', version: '1.0.9'
//compile group: 'ch.qos.logback', name:'logback-core', version: '1.0.9'

// https://mvnrepository.com/artifact/com.itextpdf/itextpdf
compile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13'

// https://mvnrepository.com/artifact/com.itextpdf.tool/xmlworker
compile group: 'com.itextpdf.tool', name: 'xmlworker', version: '5.5.13'

// jsoup HTML parser library @ https://jsoup.org/
compile 'org.jsoup:jsoup:1.11.3'

compile group: 'com.datastax.cassandra',name: 'cassandra-driver-core',version:'3.2.0'
compile('org.springframework.boot:spring-boot-starter-data-cassandra')

compile('org.projectlombok:lombok:1.18.2')

compile group: 'com.myproject.set.fusion.audit.client', name: 'audit-client', version: '2.0.1.RELEASE'

compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.3'

}

dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

注意:当我扫描 gradle 文件时,我注意到我的所有 JAR 文件都在“这里!”显然,当我进行 CLEAN 和 BUILD 时,我所有的 JAR 文件都放在这里。如果是这种情况,那么我是否应该能够引用我需要的所有 JAR 文件,然后将它们从/jdk/jre/lib 目录中删除?

想法和建议?

最佳答案

可以添加吗

compile group: 'org.springframework.data', name: 'spring-data-cassandra', version: '2.0.4.RELEASE'

这应该使 org.springframework.cassandra.config.CassandraCqlClusterFactoryBean 也可用导入..(即它包含在 spring-data-cassandra-2.0.4.RELEASE.jar 中,将被拉下来)

关于java - 在哪里可以找到 org.springframework.cassandra.config jar。我看到的只是 org.springframework.data.cassandra,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53523707/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com