January 2019
Beginner to intermediate
352 pages
8h
English
To build a basic HTML5 application that exposes your API, you will need to implement a few steps. First of all, you need to enable your previous microservice to accept HTTP requests from different domains (a feature called cross-origin resource sharing).
In order to do this, I have used an open source plugin that enables CORS support for JAX-RS 2.0 in the Java EE 7 environment.
Put this fraction of XML into the pom.xml file of the microservices built from the previous sections, as follows:
<!-- CORS Support For JAX-RS 2.0 / JavaEE 7 -->
<dependency> <groupId>com.airhacks</groupId> <artifactId>jaxrs-cors</artifactId> <version>0.0.2</version> <scope>compile</scope> </dependency>
This plugin creates the filter needed ...
Read now
Unlock full access