`

Maven 异常 Execution default of goal org.springframework.boot:spring-boot-maven-pl

 
阅读更多

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.3.RELEASE:repackage (default) on project spring-boot-xjt: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.3.3.RELEASE:repackage failed: Unable to find a single main class from the following candidates [com.xjt.Application, com.xjt.duaidi.KdniaoTrackQueryAPI, com.xjt.duaidi.Kuaidi100, com.xjt.test.Server2, com.xjt.test.Server3] -> [Help 1]

 

原因:查看这几个类,发现这几个类中确实均有一个main方法,去掉一个多余的main方法,保留唯一的main方法。

分享到:
评论

相关推荐

    009 maven插件spring-boot-maven-plugin

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin ``` 继承 Starter 父 POM Spring Boot 提供了一个 Starter 父 POM,用于简化 Spring Boot 项目的构建过程。该 POM 包含了许多...

    Spring Boot Maven插件使用详解

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin <version>1.5.6.RELEASE <execution> <goal>repackage</goal> </execution> ... ... ``` 重新打包的过程将在 Maven ...

    spring-boot aop

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-aop ``` 2. **创建切面类**:创建一个Java类,并使用`@Aspect`注解标记为切面。这个类可以包含一个或多个通知方法,这些方法通过其他注解...

    Spring Boot+maven打war包的方法

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin <version>2.0.1.RELEASE <execution> <goal>repackage</goal> </execution> ``` 3. 添加spring-boot-starter-tomcat...

    [SpringBoot2.X]29- SpringBoot项目打包与多环境配置

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin <version>2.x.x.RELEASE <execution> <goal>repackage</goal> </execution> ``` #### Gradle打包插件配置示例: 在`...

    深入SpringBoot(十四):jar-war打包解决方案.docx

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-parent <version>2.4.0 <packaging>jar <finalName>demo <groupId>org.springframework.boot <artifactId>spring-boot-maven-...

    spring5aop注解需要jar

    implementation 'org.springframework:spring-context:5.x.x.RELEASE' // 替换为实际版本 implementation 'org.springframework:spring-aop:5.x.x.RELEASE' // 替换为实际版本 ``` 4. **配置AOP**: 在Spring ...

    SpringBoot瘦身打包部署的实现

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin <execution> <goal>repackage</goal> </execution> ``` 然后,执行命令:mvn clean package将编译后的Jar包解压,拷贝...

    org.aspectj.lang.annotation.Around所需要的包

    <groupId>org.springframework <artifactId>spring-aop <version>5.x.x.RELEASE</version> <!-- 使用适当的版本号 --> <groupId>org.aspectj <artifactId>aspectjrt <version>1.x.x</version> <!-- 使用...

    framework-maven-plugin:框架-maven-插件

    “框架-Maven-插件”通常会包含一些针对特定框架的构建、打包、部署等目标,例如Spring Boot的spring-boot-maven-plugin,它可以方便地对Spring Boot应用进行打包和运行。这类插件使得开发者无需深入理解框架内部的...

    eureka分布式微服务

    import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @SpringBootApplication @EnableEurekaServer public class...

    springboot+mysql+mybatis+druid实现多数据源配置

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-parent <version>1.5.8.RELEASE <!-- Spring Boot Web Starter --> <groupId>org.springframework.boot <artifactId>spring-boot-...

    Maven问题包在我身上.docx

    <groupId>org.springframework.boot <artifactId>spring-boot-maven-plugin <execution> <goal>repackage</goal> </execution> ``` 如果项目中包含系统级别的依赖(如`systemPath`),则需要...

    springboot + jsp 打包教程

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-web <!-- Remove the following exclude if you want to use JSP --> <!-- <groupId>org.springframework.boot <artifactId>spring-...

    【小QのSpringBoot】打包可部署的War包DEMO

    exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' } } springBoot { mainClassName = 'your.package.name.Application' // 指定Spring Boot主类 } ``` 完成上述配置后,执行`...

    Spring Boot

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-web ${springboot.version} ``` 2. **自动配置**: - Spring Boot能够自动检测项目中的依赖,并进行相应的配置。例如,如果检测到...

    spring定时任务注解实现

    implementation 'org.springframework.boot:spring-boot-starter-quartz' ``` 如果你使用的是Spring Boot,上述依赖会自动配置一个调度器,如Quartz或Spring's TaskExecution and TaskScheduling。对于非Spring ...

    activiti-spring-boot.zip

    <groupId>org.springframework.boot <artifactId>spring-boot-starter-data-jpa ``` 4. **流程定义与部署** 使用Activiti,我们可以通过BPMN 2.0 XML文件来定义流程。在Spring Boot应用中,可以创建一个配置...

    Spring AOP demo (maven)

    <groupId>org.springframework <artifactId>spring-context <version>5.x.y.RELEASE <groupId>org.springframework <artifactId>spring-aop <version>5.x.y.RELEASE ``` 2. **配置AOP**:在Spring的...

    Spring Boot集成spring-boot-devtools开发时实现热部署的方式

    <groupId>org.springframework.boot <artifactId>spring-boot-devtools <optional>true</optional> <!-- 这个需要为 true 热部署才有效 --> ``` **集成注意事项** - 确保IDE配置中开启了自动编译功能,如...

Global site tag (gtag.js) - Google Analytics