首页 > 解决方案 > 启动新微服务的问题..我是一个完整的新手

问题描述

<?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 https://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.5.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>io.javabrains</groupId>
    <artifactId>movie-catalog-service</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>movie-catalog-service</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </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>

这是我的 pom 文件,我收到类似的错误

[Project 'org.springframework.boot:spring-boot-starter-parent:2.5.0' not found][1]
[Project 'org.springframework.boot:spring-boot-starter-parent:2.5.0' not found][2]  
Project 'org.springframework.boot:spring-boot-starter-parent:2.5.0' not found
Dependency 'org.springframework.boot:spring-boot-starter-web:' not found
Dependency 'org.springframework.boot:spring-boot-starter-web:' not found
Dependency 'org.springframework.boot:spring-boot-starter-test:' not found
Dependency 'org.springframework.boot:spring-boot-starter-test:' not found
Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found
Plugin 'org.springframework.boot:spring-boot-maven-plugin:' not found

所有这些在代码中都是红色的,我该怎么办?

当我运行我的应用程序主方法时,它也显示错误我应该做什么?

标签: javaspring-bootmicroservices

解决方案


推荐阅读