Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.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
Java 从下载后显示错误的pom.xmlhttps://start.spring.io/_Java_Spring_Hibernate_Thymeleaf - Fatal编程技术网

Java 从下载后显示错误的pom.xmlhttps://start.spring.io/

Java 从下载后显示错误的pom.xmlhttps://start.spring.io/,java,spring,hibernate,thymeleaf,Java,Spring,Hibernate,Thymeleaf,尝试学习使用spring、thymeleaf、hibernate和mysql数据库开发web应用程序的教程。我在下载zip后使用创建了该项目,pom.xml显示了标记标题标记的错误 我已经运行了maven build和maven clean,两者都成功了,但是错误仍然没有发生 //我在第一行得到了错误,没有任何提示 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM

尝试学习使用spring、thymeleaf、hibernate和mysql数据库开发web应用程序的教程。我在下载zip后使用创建了该项目,pom.xml显示了标记标题标记的错误

我已经运行了maven build和maven clean,两者都成功了,但是错误仍然没有发生

//我在第一行得到了错误,没有任何提示

<?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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.6.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>net.codejava</groupId>
    <artifactId>ProductManager</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>ProductManager</name>
    <description>Spring boot CRUD web app Example</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

</project>

4.0.0
org.springframework.boot
spring启动程序父级
2.1.6.1发布
net.codejava
产品经理
0.0.1-快照
产品经理
Spring boot CRUD web应用程序示例
1.8
org.springframework.boot
spring引导启动器数据jpa
org.springframework.boot
弹簧启动装置
org.springframework.boot
SpringBootStarterWeb
mysql
mysql连接器java
运行时
org.springframework.boot
弹簧起动试验
测试
org.springframework.boot
springbootmaven插件

您可以尝试将启动版本降级到2.1.4.0版本

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.4.RELEASE</version>
    <relativePath /> <!-- lookup parent from repository -->
</parent>

org.springframework.boot

如果您使用的是eclipse,那么这就是eclipse的问题,如果您可以运行spring项目并检查它是否运行良好? 如果它正在运行,那么不要担心。
很抱歉,这是一个模棱两可的问题。我在eclipse中也遇到过同样的问题。从start.spring.io生成的项目没有任何打包信息jar/war

<groupId>net.codejava</groupId>
<artifactId>ProductManager</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
net.codejava
产品经理
0.0.1-快照
罐子

现在它在添加“包装”后没有显示任何内容。稍后maven>更新项目

欢迎使用堆栈溢出!您提供了一些有用的细节,但您的问题仍然缺少关键信息;您看到了什么错误消息?您在什么时候看到错误消息?等等。在您的系统中是否正确安装了maven和jdk,还可以在eclipse的构建路径中设置jdk。同时尝试删除.m2->repository并再次尝试导入所有依赖项。可能与[此]()“从缓存在本地存储库中的org.apache.maven.plugins:maven surefire plugin:pom:2.22.1传输失败,在经过central的更新间隔或强制更新之前,将不会重新尝试解析。”。原始错误:无法将工件org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.1从/传输到中心():repo.maven.apache.org pom.xml/ProductManager line 1这是我试图降级到2.1.4版本时遇到的错误,我已经完成了maven更新,选择了强制更新,但仍然存在上述错误非常感谢,这解决了项目的一部分,但没有解决所有问题。。。。降级后,它开始显示另一个与jdk有关的错误。但是我已经解决了这个错误