New Spring Framework Rolls Out The Red Carpet For CORS

Spring Framework version 4.2 RC1 now offers solid support for cross-origin Resource sharing (CORS), which brings the Framework more in line with contemporary technologies, such as HTML5 and REST APIs.

The CORS standard enables access to restricted resources from a domain other than the parent web page, offering more functionality than requests operating within the same-origin security policy. This is particularly useful with the rise of REST APIs, as data is often served by a different host than the one that serves the JavaScript.

Without CORS support in the past, users of Spring MVC required a filter-based solution to make AJAX requests to another domain. Now, the team that maintains the open-source framework has added first-class support for CORS, providing a far easier way to configure the resource specification.

This Spring support is particularly important for provisioning APIs that have mashup potential with APIs from other domains as it will allow them to share digital assets. The move brings CORS capabilities to the forefront of Spring to make the most of REST APIs and HTML5 specifications.

Be sure to read the next Framework article: How to Create a Laravel-Based LAMP Stack on Ubuntu

Original Article

CORS Support