1.what
i need write cross domain profile in my java server with spring.
2.how
after spring web 4.2.2,can simple write below code in spring-mvc.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd>
<!-- other code -->
<mvc:cors>
<mvc:mapping path="/**" allowed-origins="*"
allowed-methods="*"
allowed-headers="*"
exposed-headers="X-Requested-With, X-PKRSS-Token" allow-credentials="true"
max-age="36000" />
</mvc:cors>
</beans>
x.Last
Thanks readed~_~
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment