Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试添加spring数据时缺少工件_Spring_Maven_Spring Data - Fatal编程技术网

尝试添加spring数据时缺少工件

尝试添加spring数据时缺少工件,spring,maven,spring-data,Spring,Maven,Spring Data,我试图将spring数据依赖项添加到我的spring boot starter项目中,但我得到了错误:缺少工件org.springframework.data:spring数据jdbc ext:jar:1.0.0.RELEASE 这是我的pom.xml文件。我错过了什么 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http

我试图将spring数据依赖项添加到我的spring boot starter项目中,但我得到了错误:
缺少工件org.springframework.data:spring数据jdbc ext:jar:1.0.0.RELEASE

这是我的pom.xml文件。我错过了什么

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
  <groupId>com.test</groupId>
  <artifactId>myApp</artifactId>
  <version>0.0.1-SNAPSHOT</version>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.0.0.RC1</version>
    </parent>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf-spring4</artifactId>
        </dependency>
            <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jdbc-ext</artifactId>
        <version>1.0.0.RELEASE</version>
    </dependency>
    </dependencies>

    <properties>
        <start-class>com.test.Application</start-class>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spring-milestone</id>
            <url>http://repo.spring.io/libs-milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestone</id>
            <url>http://repo.spring.io/libs-milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>

4.0.0
com.test
myApp
0.0.1-快照
org.springframework.boot
spring启动程序父级
1.0.0.RC1
org.springframework.boot
SpringBootStarterWeb
org.thymeleaf
百里香
org.springframework.data
spring数据JDBCext
1.0.0.1版本
com.test.Application
org.springframework.boot
springbootmaven插件
春季里程碑
http://repo.spring.io/libs-milestone
假的
春季里程碑
http://repo.spring.io/libs-milestone
假的

由于某些原因,网站上的文档是错误的(或分发错误!)

根据该页面,您确实需要包含您提到的依赖关系

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-jdbc-ext</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

org.springframework.data
对于该工件,它包含一个发布版的zip文件,而不是jar或pom文件

SpringDataJDBCExt项目由两个工件组成,这两个工件都可用。将依赖项更改为以下内容

<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-jdbc-core</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-oracle</artifactId>
    <version>1.0.0.RELEASE</version>
</dependency>

org.springframework.data
spring数据jdbc核心
1.0.0.1版本
org.springframework.data
spring数据甲骨文
1.0.0.1版本
如果您不需要特定的Oracle扩展,那么可以不使用该扩展


值得注意的是,还有一个1.1.0.M1版本(里程碑/预发布版本),它可以与较新版本的Spring数据一起使用。您可能希望尝试使用该版本,而不是1.0.0.RELEASE版本,该版本是根据旧版本的Spring Data构建的。

如果您浏览到,您可以看到那里确实没有jar。它也不会出现在任何其他maven搜索中。也许可以试试spring data jdbc core
?Marten的建议是正确的。spring.io网站中有一个bug,我们将对此进行更正。同时,使用此处建议的依赖项。