Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 23 microservices and containers http localhost 8080 EmployeeService 10 rest acmeemployee If the URL is entered into the browser the RESTful web service method containing a @ GET annotation and no specified @ Path will be invoked by default Deployment Options More than one service can be deployed by passing the deploy option as many times as needed to accommodate the number of services being deployed for example java jar payara micro 412174 jar deploy Service 1 war deploy Service 2 war It might be beneficial to deploy an exploded WAR file at times and it is possible to do that by specifying the root directory path of the WAR file in the deploy option In this situation a file named reload can be placed into the exploded WAR files root directory and the time stamp of the file can be updated to cause a redeployment to occur To deploy multiple instances of Payara Micro on a single machine simply pass the port option and specify a different port number for each instance For example to deploy the EmployeeService to multiple instances on the same host deploy the service as outlined in the previous section for the initial deployment and add the port option for each subsequent deployment java jar payara micro 412174 jar deploy EmployeeService 10 war port 8082 If a service or application has been added to a Maven repository it can be deployed directly from there This can be done by specifying the deployFromGAV option and listing the Maven
You must have JavaScript enabled to view digital editions.