1
servicemix에 angular2 웹 응용 프로그램을 war 파일로 배포하고 있습니다. 앱이 localhost:8181/angular2webapp
url에서 실행됩니다. 기본적으로 낙타 구성 요소 인 REST 요청에 번들이 설치되어 있습니다. 이 angular2 응용 프로그램을 사용하는 동안 Apache ServiceMix에서 CORS 사용 가능
<cxf:rsServer id="rsServer" address="http://localhost:9090"
serviceClass="com.mypackage.class.MyClass" />
지금, 나는 내 경로에서
.setHeader("Access-Control-Allow-Origin", constant("*"))
를 사용하여 시도
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:8181' is therefore not allowed access.
를 얻고 있지만 작동하지 않습니다. 아무도 도와 주실 수 없습니까?