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>

please add a 'mainClass’ property的更多相关文章

  1. hibernate处理null 时提示:Property path [...] does notreference a collection

    Hibernate判断某属性不为null 且不可为空时出现Property path [...] does notreference a collection 的问题 处理空的方法: isNotEmp ...

  2. iphone dev 入门实例7:How to Add Splash Screen in Your iOS App

    http://www.appcoda.com/how-to-add-splash-screen-in-your-ios-app/ What’s Splash Screen? For those who ...

  3. Spring 3.1 M1: Unified Property Management(转)

    In the first two posts of this series, I described the bean definition profiles feature, and how it ...

  4. 封装和 property方法

    封装其实就是一个类用双下划线把自己的属性或者方法给限制住 不让其他的类直接调用或者修改  必须通过这个类来进行操作,这个类通过双下划线__把自己的属性和方法给限制住了 封装就是私有的过程 把父类中的属 ...

  5. FCC---CSS Flexbox: Align Elements Using the justify-content Property

    Sometimes the flex items within a flex container do not fill all the space in the container. It is c ...

  6. FCC---CSS Flexbox: Apply the flex-direction Property to Create a Column in the Tweet Embed

    The tweet embed header and footer used the flex-direction property earlier with a row value. Similar ...

  7. FCC---CSS Flexbox: Use the flex-direction Property to Make a Column

    The last two challenges used the flex-direction property set to row. This property can also create a ...

  8. How to: Initialize Business Objects with Default Property Values in XPO 如何:在 XPO 中用默认属性值初始化业务对象

    When designing business classes, a common task is to ensure that a newly created business object is ...

  9. FCC---CSS Flexbox: Apply the flex-direction Property to Create Rows in the Tweet Embed

    The header and footer in the tweet embed example have child items that could be arranged as rows usi ...

随机推荐

  1. AC日记——总分 Score Inflation 洛谷 P2722

    题目背景 学生在我们USACO的竞赛中的得分越多我们越高兴. 我们试着设计我们的竞赛以便人们能尽可能的多得分,这需要你的帮助 题目描述 我们可以从几个种类中选取竞赛的题目,这里的一个"种类& ...

  2. Codeforces Gym 100431D Bubble Sort 水题乱搞

    原题链接:http://codeforces.com/gym/100431/attachments/download/2421/20092010-winter-petrozavodsk-camp-an ...

  3. [Violet 4] 毕业旅行

    2718: [Violet 4]毕业旅行 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 672  Solved: 389[Submit][Status ...

  4. fastjson的序列化属性

    在将使用JSON.toJSONString(result, SerializerFeature.PrettyFormat)将JSONObject转化为字符串时,可以指定一些序列化属性,设置转化后的字符 ...

  5. xcode5 asset catalogs 由于图标尺寸错误导致编译问题解决[原创]

    如下图,即使图片尺寸不规范,xcode5也可以正常预览(这里我提供的尺寸是57*57, 而需要的是120*120) 但编译运行失败,报的错是: Images.xcassets: error: The ...

  6. 【hibernate】唯一约束 注解

    唯一约束注解 单列约束和联合约束 分别如下 @Table( uniqueConstraints = { @UniqueConstraint(columnNames = "uid") ...

  7. 为了安全,linux下如何使用某个用户启动某个进程?

    安全里有个原则,叫最小权限原则 根据这个原则,对于启动某个应用或者进程,应该赋予其最小权限,根据应用权限要求,创建一个相应权限的用户,赋予其应用相应的权限,然后使用这个用户启用这个应用 如何使用某个用 ...

  8. C# 获取COM对象 ProgId ClsId

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/fe262fdd-a93f-427e-8771-2c64e7ac3064/getting- ...

  9. MySQL:unknown variable &#39;master-host=masterIP&#39; [ERROR] Aborting

    <span style="font-size:18px;">120401 15:45:44 [ERROR] C:\Program Files\MySQL\MySQL S ...

  10. Android学习笔记(十八)——使用意图筛选器和实现浏览网页(附源代码)

    使用意图筛选器 点击下载源代码 1.创建一个Intents项目,给该项目加入一个新类,命名为MyBrowserActivity.在res/layout目录下新增一个browser.xml: 2.在An ...