Closed ericop closed 8 years ago
I don't know who is maintaining that service but it isn't serving CORS headers ( @gregturn maybe?). Look in your Javascupt console for errors like this:
XMLHttpRequest cannot load http://rest-service.guides.spring.io/greeting. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
Spot on @dsyer ! Hopefully the CORS stuff can get patched up and this demo will be operational once again.
It's happening to me as well. On Firefox it's not logging anything, but on chromium I have got the following:
XMLHttpRequest cannot load http://rest-service.guides.spring.io/greeting. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
All of the JS guides have this CORS issue. I haven't figured out how to get the policy Working properly for the CF-hosted backend service.
Where is the source code?
here https://github.com/spring-guides/gs-consuming-rest-angularjs/tree/master/complete
@dsyer sorry, I misunderstood :-)
Thanks but that's the guide, not the service it consumes.
Works for me now (I think this is a duplicate of https://github.com/spring-guides/gs-consuming-rest-angularjs/issues/2)
So http://rest-service.guides.spring.io/greeting is up and running
but running
gs-consuming-rest-angularjs-complete
(obtained thru STS 3.7.1 File > New > Import Spring Getting Started Content) thru the app.groovy (with Spring CLI v1.2.7.RELEASE) doesn't pull in dynamic content to be rendered.Expected when visiting http://localhost:8080/ The ID is 415
The content is Hello, World!
Actual
The ID is
The content is