Git Product home page Git Product logo

wildfly-swarm-boilerplate's Introduction

Wildfly-Swarm boilerplate

This is a simple and small boilerplate to provide a basic setup for a JavaEE application running in a wildfly-swarm server, including the following dependencies:

  • JAX-RS
  • CDI
  • Arquillian
  • Wildfly-Swarm
  • Gson
  • rest-assured

Simply checkout the repository and execute

mvn package
java -jar ./target/demo-swarm.jar

to run the application. In this basic setup, the application provides a Hello-REST-Resource http://localhost:8090/hello Run a curl -X GET http://localhost:8090/hello to verify, the application works as designed.

Stage Configuration

The setup provides some stage configs for development and production to demonstrate stage specific configuration. You can start your application by providing the java property -Dswarm.project.stage=<stage>. For example

java -jar ./target/demo-swarm.jar -Dswarm.project.stage=development

If you don't provide any stage, swarm uses the settings from project-defaults.yml. Keep in mind, that the port for the development and production stages differs so that you can run development and production in parallel. In the below table you find the port and endpoint settings from the provided stages. Feel free to add or customize more stages based on your demand.

Stage Port Endpoint
development 8090 http://localhost:8090/hello
production 8180 http://localhost:8180/hello

Integration Tests

The project includes a basic arquillian setup to run integration tests and test the Hello-Resource. Simply run mvn test to start the integration tests. The test will startup a wildfly-swarm instance using the @DefaultDeployment annotation of wildfly.

wildfly-swarm-boilerplate's People

Contributors

cremich avatar

Stargazers

Nándor Holozsnyák avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.