简体   繁体   English

无法在项目用户上执行目标 org.springframework.boot:spring-boot-maven-plugin:2.6.7:run (default-cli):

[英]Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.7:run (default-cli) on project userms:

I am trying to run a maven application using spring on running the application compiles successfully but on running the command mvn spring-boot:run the following error appears.我正在尝试使用 spring 运行 maven 应用程序,运行应用程序编译成功,但运行命令 mvn spring-boot:run 时出现以下错误。 I am running the application in eclipse IDE.我在 Eclipse IDE 中运行应用程序。

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.6.7:run (default-cli) on project userms: Application finished with exit code: 1 -> [Help 1]

This is my pom.xml file这是我的 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 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.6.7</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.trainingapps</groupId>
    <artifactId>userms</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>userms</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>1.8</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-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-validation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.29</version>
        </dependency>

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-api</artifactId>
            <version>0.11.2</version>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>0.11.2</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-jackson</artifactId> <!-- or jjwt-gson if Gson is preferred -->
            <version>0.11.2</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>

This error never occured before when I was running other applications.在我运行其他应用程序之前从未发生过此错误。

Hi the issue can be cause by a lot of things but the funny thing could be small typing mistake in application.properties.嗨,这个问题可能是由很多事情引起的,但有趣的事情可能是 application.properties 中的小输入错误。

in my case I missed out one letter in the database name and in his case he gave the application a wrong password.在我的情况下,我错过了数据库名称中的一个字母,在他的情况下,他给了应用程序一个错误的密码。

Check letter by letter and line by line.逐个字母逐行检查。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.1.12.RELEASE:run (default-cli) - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.12.RELEASE:run (default-cli) 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.5.5:run (default-cli) - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.5:run (default-cli) 未能执行目标 org.springframework.boot:spring-boot-maven-plugin:2.2.5.RELEASE:run (default-cli) - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.5.RELEASE:run (default-cli) 无法在项目 someProject 上执行目标 org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:run (default-cli):无法执行 java - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.4.2.RELEASE:run (default-cli) on project someProject: Could not exec java 构建 docker 镜像时出错,无法在项目上执行目标 org.springframework.boot:spring-boot-maven-plugin:2.5.2:build-image (default-cli) - Error while building docker image, Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.2:build-image (default-cli) on project Maven - 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.4.1:run - Maven - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.1:run 无法执行目标org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE:run - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.8.RELEASE:run 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:run - Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.2.RELEASE:run 执行目标 org.springframework.boot:spring-boot-maven-plugin:2.4.4:repackage 的 default-cli 失败:无法找到主 class - Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.4.4:repackage failed: Unable to find main class org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.4.8:run - org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.4.8:run
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM