No 'Access-Control-Allow-Origin' error with Spring RESTful hosted in Pivotal web services
问题 I create a RESTful API with Spring boot and host it in Pivotal web services . Let's say the url is https://abc.cfapps.io/students and the json result will be [ {"id":1,"name":"Michael","score":8.5}, {"id":2,"name":"Naomi","score":5.6} ] Then I write an Angular client to send a request to that url: angular.module("app", []).controller("listController", function($scope, $http) { var url = 'https://abc.cfapps.io/students'; var httpRequest = new XMLHttpRequest(); httpRequest.open('GET', url, true