如果我在spring工具包中创建一个标准的Spring项目,那就太棒了!
我访问localhost:8080 /问候并得到我的hello world响应.
如果我将这2个文件复制到我的源代码树中的另一个包中,然后访问localhost:8080 / greeting我得到一个:
Whitelabel Error Page
This application has no explicit mapping for /error,so you are seeing this as a fallback.
Fri Oct 17 18:15:45 BST 2014
There was an unexpected error (type=Not Found,status=404).
将3个类移动到相同的默认包中可以解决问题,但是从源树组织的角度来看,这不是我想要做的.
最佳答案