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>

最新文章

  1. jenkins 中 Poll SCM 和 Build periodically 的区别
  2. Java使用poi操作cexel
  3. Excel统计工作簿sheet个数
  4. Linux zabbix 配置注意事项
  5. mongo快速翻页方法(转载)
  6. PS4 Razor GPU
  7. 一张图搞懂 Javascript 中的原型链、prototype、__proto__的关系 转载加自己的总结
  8. 查询在应用程序运行得很慢, 但在SSMS运行得很快的原因探究
  9. NhibernateProfiler-写个自动破解工具(源码)
  10. 2.编写IoDemo.java的Java应用程序,程序完成的功能是:首先读取text.txt文件内容,再通过键盘输入文件的名称为iodemo.txt,把text.txt的内容存入iodemo.txt
  11. mysql触发器的使用
  12. 浏览器播放rtsp流媒体解决方案
  13. 【类与对象】--------java基础学习第六天
  14. xml方式将dataset导出excel
  15. Linux基础(二)centOS7密码重置
  16. 基础练习 回形取数 (循环 + Java 输入输出外挂)
  17. http_build_query用法,挺方便的
  18. 20155238 2016-2017-2 《JAVA程序设计》第九周学习总结
  19. PAT 1060 爱丁顿数
  20. Kotlin都转正成Android官方语言了,你还不试一下?

热门文章

  1. POJ 2411Mondriaan&#39;s Dream
  2. vSphere Client 更改 ESX/ESXi 主机的端口
  3. 洛谷—— P1847 轰炸II
  4. 板子-GOD BLESS ALL OF YOU
  5. Maven的构建配置文件(Build Profiles)
  6. Android---简单的动画
  7. 调用tensorflow中的concat方法时Expected int32, got list containing Tensors of type &#39;_Message&#39; instead.
  8. iOS UI08_TableView界面传值
  9. TI C66x DSP 四种内存保护问题 -之- CPU訪问corePac内部资源时的内存保护问题
  10. UVA571 - Jugs(数论)