I've got a very basic survey app :
Survey.java
)SurveyController.java
)SurveyRepository.java
)ApiConfiguration.java
)You can see it live here: http://survey-preprod.cloudfoundry.com/. The sources are available here: https://github.com/fbiville/spring-example-survey.
Just properly fill the form (3 steps - just answer anything) till you see the "Thanks!" page. Then proceed: http://survey-preprod.cloudfoundry.com/api/survey and notice there is no contents at all!
This happened will all Spring Data / REST I pushed to Cloud Foundry. When run locally, there isn't any problems at all.
Is there something I missed?
Thanks in advance, Rolf
EDIT: even with
curl -v -H "Accept: application/json" -X GET http://survey-preprod.cloudfoundry.com/api/survey
(so the accept header is properly set), no contents are exposed...
Well guys, as (sadly) often, this is a clear PEBKAC instance.
ApiConfiguration was importing CoreConfiguration (which was already loaded once as defined by web.xml). Therefore, the same "core" beans were loaded again, but CloudFoundry auto-reconfiguration occurred only the first time on the declared datasource and let the duplicated one as is (that is: an H2 database, of course without any contents).