springboot项目打包提示Unable to find a single main class from the following candidates错误
提示Unable to find a single main class from the following candidates错误的原因是会从所有代码里面扫描包括main方法的类,找到多个类就报错了。
解决办法是在pom.xml指定启动的类:
<properties>
<start-class>com.corp.MyApplication</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
springboot项目打包提示Unable to find a single main class from the following candidates错误的更多相关文章
- Maven使用package打包Spring Boot时出现:Unable to find a single main class from the following candidates的问题解决
		
问题如下: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.5.RELEASE ...
 - SpringBoot学习之一 Unable to find a single main class from the following candidates
		
在启动SpringBoot项目是报错 Unable to find a single main class from the following candidates [boot.myboot.Sam ...
 - Unable to find a single main class from the following candidates ,显示有两个main class
		
由于基础框架是用的网上down的源码,我将项目名字改了,估计没有进行maven clean,本地调试的时候没有问题. 当发布时候,执行maven install 一直提示上述错误. 解决办法:1.ma ...
 - Unable to find a single main class from the following candidates
		
关于start-class,spring boot官方手册是这么说明的: The plugin rewrites your manifest, and in particular it manages ...
 - SpringBoot 项目打包后获取不到resource下资源的解决
		
SpringBoot 项目打包后获取不到resource下资源的解决 在项目中有几个文件需要下载,然后不想暴露真实路径,又没有CDN,便决定使用接口的方式来获取文件.最初的时候使用了传统的方法来获取文 ...
 - springboot项目打包运行
		
在springboot项目打包成jar包时,在cmd中使用java -jar **.jar时,浏览器无法访问. 解决方法:把项目改成war包项目,在pom文件中更改,并打成war包. 使用maven命 ...
 - SpringBoot 项目打包后运行报 org.apache.ibatis.binding.BindingException
		
今天把本地的一个SpringBoot项目打包扔到Linux服务器上,启动执行,接口一访问就报错,但是在本地Eclipse中启动执行不报错,错误如下: org.apache.ibatis.binding ...
 - SpringBoot项目打包成jar后,启动脚本
		
将springboot项目打包成jar后,上传至服务器,每次都需要手敲命令,重新部署项目,可将这些命令写入脚本中,直接运行. 启动脚本(start.sh): CUR_PATH=$(cd "$ ...
 - 用gradle把springboot项目打包成jar
		
``` 用gradle把springboot项目打包成jar ```### build.gradle 中添加 buildscript { repositories { mavenLocal() mav ...
 
随机推荐
- hdu 4540 dp
			
题意: 假设: 1.每一个时刻我们只能打一只地鼠,并且打完以后该时刻出现的所有地鼠都会立刻消失: 2.老鼠出现的位置在一条直线上,如果上一个时刻我们在x1位置打地鼠,下一个时刻我们在x2位置打地鼠,那 ...
 - Qt 4.7.2移植到ARM教程
			
Qt的移植包括步骤如下: 1.下载并安装VMware WorkStation 12(最好比较高级的版本,早期的版本共享目录在虚拟机里可能显 示不了). 2.下载ubuntu 14.0.4(最好是lts ...
 - 解决firefox不支持innerText的办法
			
js代码: <script> window.onload = function(){ if(window.navigator.userAgent.toLowerCase().indexOf ...
 - 新型穿墙监控雷达Range-R:让你的隐私无所遁形(转)
			
还是隐私问题,原帖地址:http://www.freebuf.com/news/57446.html 在我们的认知中,政府对民众的监控已经成为一种常态.从电话.电子邮件到通信聊天.社交网络,一切细节都 ...
 - jquery.uploadify 使用过程
			
HTML: <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"& ...
 - 5V and 3V Level Translators
			
http://www.daycounter.com/Circuits/Level-Translators/Level-Translators.phtml Interfacing 5V and 3V l ...
 - 算法:基于 RingBuffer 的  Deque 实现
			
背景 前两篇文章介绍了 Queue 的实现,很多类库都引入了 Deque,Deque 可以两头添加和删除,然后在 Deque 之上构建 Queue 和 Stack. Deque 代码 using Sy ...
 - 分布式消息系统Kafka初步(一) (赞)
			
终于可以写kafka的文章了,Mina的相关文章我已经做了索引,在我的博客中置顶了,大家可以方便的找到.从这一篇开始分布式消息系统的入门. 在我们大量使用分布式数据库.分布式计算集群的时候,是否会遇到 ...
 - 解决sqoop 导入oracle表时 --split-by参数为日期类型时的报错:ORA-01861: literal does not match format string
			
报错栈: -- ::, INFO [main] org.apache.sqoop.mapreduce.db.DBRecordReader: Executing query: select " ...
 - js 中时间格式化的几种方法
			
1.项目中时间返回值,很过时候为毫秒值,我们需要转换成 能够看懂的时间的格式: 例如: yyyy-MM-dd HH:mm:ss 2.处理方法(处理方法有多种,可以传值到前端处理,也可以后台可以好之后再 ...