March 2018
Intermediate to advanced
310 pages
7h 10m
English
Another way in which you can provide Swarm configuration is YAML data serialization language.
Once more, let's start with the port-change example. We will start again with JAX-RS example and modify it to use the YAML configuration.
First, let's create the HTTP-port.yml configuration file inside the resources directory:
swarm: http: port: 12345
The nested properties are translated to flat properties by Swarm. So, the property specified by the preceding file is translated to swarm.http.port, which we know well already.
To use the following configuration, we have to modify our Main class:
package org.packt.swarm.petstore.catalog;import org.wildfly.swarm.Swarm;import java.net.URL;public class Main { public static void main ...
Read now
Unlock full access