please add a 'mainClass’ property
2024-09-04 17:45:16
when build an spring project with this command:
mvn spring-boot:run
there will may show an error message like this:
Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.2.5.RELEASE:run (default-cli) on project gs-rest-service: Unable to find a suitable main class, please add a 'mainClass’ property
ok,i was bothering by this case...so,,,google..google..and find this web page:
http://docs.spring.io/autorepo/docs/spring-boot/1.2.4.RELEASE/maven-plugin/usage.html
And ,this is the Solution(the bold part)
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>class_name</mainClass>
</configuration>
</plugin>
最新文章
- jenkins 中 Poll SCM 和 Build periodically 的区别
- Java使用poi操作cexel
- Excel统计工作簿sheet个数
- Linux zabbix 配置注意事项
- mongo快速翻页方法(转载)
- PS4 Razor GPU
- 一张图搞懂 Javascript 中的原型链、prototype、__proto__的关系 转载加自己的总结
- 查询在应用程序运行得很慢, 但在SSMS运行得很快的原因探究
- NhibernateProfiler-写个自动破解工具(源码)
- 2.编写IoDemo.java的Java应用程序,程序完成的功能是:首先读取text.txt文件内容,再通过键盘输入文件的名称为iodemo.txt,把text.txt的内容存入iodemo.txt
- mysql触发器的使用
- 浏览器播放rtsp流媒体解决方案
- 【类与对象】--------java基础学习第六天
- xml方式将dataset导出excel
- Linux基础(二)centOS7密码重置
- 基础练习 回形取数 (循环 + Java 输入输出外挂)
- http_build_query用法,挺方便的
- 20155238 2016-2017-2 《JAVA程序设计》第九周学习总结
- PAT 1060 爱丁顿数
- Kotlin都转正成Android官方语言了,你还不试一下?
热门文章
- POJ 2411Mondriaan&#39;s Dream
- vSphere Client 更改 ESX/ESXi 主机的端口
- 洛谷—— P1847 轰炸II
- 板子-GOD BLESS ALL OF YOU
- Maven的构建配置文件(Build Profiles)
- Android---简单的动画
- 调用tensorflow中的concat方法时Expected int32, got list containing Tensors of type &#39;_Message&#39; instead.
- iOS UI08_TableView界面传值
- TI C66x DSP 四种内存保护问题 -之- CPU訪问corePac内部资源时的内存保护问题
- UVA571 - Jugs(数论)