码迷,mamicode.com
首页 > 编程语言 > 详细

spring boot项目中包的组织

时间:2017-12-25 15:03:17      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:ring   flow   http   status   default   模型   expec   pretty   一个   

技术分享图片

NlpApplication是包含main函数的一个类,如果这个类放错位置会报

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Jun 30 17:24:02 CST 2015 There was an unexpected error (type=Not Found, status=404). No message available

这是stackoverflow上的一个例子:
com
   +- APP
         +- Application.java  <--- your main class should be here, above your controller classes
         |
         +- model
         |   +- user.java
         +- controller
             +- UserController.java


总之,包含main的类应该放在什么模型什么控制器所在包的外层。

 

spring boot项目中包的组织

标签:ring   flow   http   status   default   模型   expec   pretty   一个   

原文地址:http://www.cnblogs.com/herosoft/p/8108919.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!