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 ...
随机推荐
- 持续集成之Jenkins插件使用(一)- 多个job之间的串并联
转载自:http://qa.blog.163.com/blog/static/190147002201391661510655/ Jenkins除了开源和免费,还有一个最吸引人的功能之一就是支持插件. ...
- FLASK开发简易blog的学习笔记
首先,学会了如何创建一个新的包.就是在文件夹下创建__init__.py文件,就是在其他地方导入这个包了.
- VC6配置sqlite数据库
SQLite官方下载只提供给我们一个sqlite3.dll跟一个sqlite3.def文件,并没有提供用于VC++6.0的lib文件,可以利用sqlite3.def文件生成,步骤如下: 1.下载DLL ...
- java知识回顾
一.构造方法能不能被继承 当然不能,1.构造方法是类的唯一入口 2.构造方法与类名相同 3.子类构造方法中隐式的调用了父类的构造方法 二.值传递和引用传递.不变类和可变类.直接赋值和浅拷贝和深拷贝 ...
- BZOJ 4419: [Shoi2013]发微博 set模拟
4419: [Shoi2013]发微博 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4419 Description 刚开通的SH微博共 ...
- windows下python2.7.14版本的安装
本文主要对window下如何安装Python进行图解说明 步骤一.从官网下载相应的版本(本文以2.7.14为例),https://www.python.org/downloads/release/py ...
- Python— isinstance用法说明
在学习自动化测试的脚本中发现了这个函数,所以在网上查了一下资料进行如下整理: 通过帮助查看如下: 作用:来判断一个对象是否是一个已知的类型: 其第一个参数(object)为对象,第二个参数为类型名(i ...
- linux命令-每天一点进步
2018-05-28 1.yum install -y,这里的-y表示,在安装软件的过程中,无需用户输入yes or no,默认yes 2../sbin/nginx -s reload,重启nginx ...
- Swift3.0字符串相关操作
以下有关字符串的常用操作都可直接复制到Xcode中进行验证,如发现错误,请在评论区留言指正! 1.字符串的定义 var str1="hello, swift." //字符串变量 相 ...
- 记录一次软件Bug发生的过程
结束一周的紧张工作,难得的休息时光,坐在电脑前浏览博客.听听歌.看看大片,这也算是一种享受. 因为年度的开发任务已经开始了,所以最近会特别忙,新人的成长又没有想象中的好,经常在他们身上看到自己去年的影 ...