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 ...
随机推荐
- poj 3630 Phone List 贪心
Phone List Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23722 Accepted: 7289 Descr ...
- opencv第二课 进行缩放图片~
#include<stdio.h> #include<iostream> #include<opencv2\opencv.hpp> using namespace ...
- .NET面试宝典-高级2
http://blog.csdn.net/shanyongxu/article/category/6023593 对于 Web 性能优化,您有哪些了解和经验吗? 1.前端优化 (1)减少 HTTP 请 ...
- UploadFileUtil
package cn.tz.util.file; import java.io.File; import java.io.FileOutputStream; import java.io.InputS ...
- Backup your Android without root or custom recovery -- adb backup
ecently discovered a neat new way to back up apps on my Android without having to use Titanium Backu ...
- DU 4609 3-idiots FFT
题意还是比较好懂. 给出若干个木棍的长度,问这些木棍构成三角形的可能性. 那么公式很容易知道 就是这些木棍组成三角形的所有情况个数 除以 从n个木棍中取3个木棍的情况数量C(n, 3) 即可 但是很显 ...
- go test
testing 是go中自动测试的包, 直接import就可以使用, 使用时需要注意以下规范 执行测试函数的文件必须以 _test.go 结尾, 注意下划线 单元测试函数名必须以 Test 开头, 并 ...
- Oracle的数据类型
Oracle基本数据类型(亦叫内置数据类型 built-in datatypes)可以按类型分为: 字符串类型.数字类型.日期类型.LOB类型.LONG RAW& RAW类型.ROWID &a ...
- Arcgis10.5 python按属性分割图层,属性相同分为一个图层
# coding=utf-8 """ Source code for potential gp tool to create outputs based on attri ...
- 一个自带简易数据集的模拟线性分类器matlab代码——实验训练
%%%% Tutorial on the basic structure of using a planar decision boundary %%%% to divide a collecti ...