If I create a standard Spring project from spring tools, it works great!
I visit localhost:8080/greetingand get an answer hello world.
If I copy these 2 files to another package in my source tree and then go to localhost:8080/greeting, I will get:
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).
Moving 3 classes to the same package by default fixes the problem, but from the point of view of organizing the source tree, this is not what I want to do.
I expect this to be due to some auto-configuration, so please someone can tell me what I have to do so that my project can support multiple packages as controllers and objects.