Giter Site home page Giter Site logo

msa_java's Introduction

Microservices for Java

Clone

git clone https://github.com/marcelomrwin/msa_java.git

Change to master branch

git checkout master

Enter hola-springboot

cd hola-springboot

Build and run

mvn clean package spring-boot:run

Access URL

http://localhost:8080

Using curl

curl http://localhost:8080/api/hola; echo

Verifying metrics

Run outside of maven

mvn clean package
java -jar target/hola-springboot-1.0.jar

stop application

Acess backend service

cd ../backend/

Buind and run

mvn clean package jetty:run

Test backend with curl

curl -X GET http://localhost:8080/api/backend?greeting=Hello

Returning to hola-springboot

cd ../hola-springboot

Running with different port

mvn clean package spring-boot:run -Dserver.port=9090

Test URL

http://localhost:9090/api/greeting

Stop backend and hola-springboot services

Navigate to hola-dropwizard

cd ../hola-dropwizard/

build project

mvn clean package

run project

mvn exec:java

test rest service

http://localhost:8080/api/hola

test update variable

HELLOAPP_SAYING='Hello Dropwizard inline from' mvn clean package exec:java

see metrics

http://localhost:8081/

Run outside of maven

mvn clean package
java -jar target/hola-dropwizard-1.0.jar server conf/application.yml

stop application

Acess backend service

cd ../backend/

Buind and run

mvn clean package jetty:run

Test backend with curl

curl -X GET http://localhost:8080/api/backend?greeting=Hello

Navigate to hola-dropwizard

cd ../hola-dropwizard

execute with different port

mvn clean package exec:java -Ddw.server.applicationConnectors[0].port=9090

Stop backend and hola-dropwizard services

Navigate to hola-wildflyswarm

cd ../hola-wildflyswarm

start jboss forge

forge

execute application

wildfly-swarm-run

stop run

Ctrl + c

exit forge

exit

Execute with maven

mvn clean package wildfly-swarm:run

test url

http://localhost:8080

Execute with environment variables

WF_SWARM_SAYING='Yo man' mvn clean package wildfly-swarm:run

test url with new variable name

http://localhost:8080

monitor metrics

Run outside of maven

mvn clean package
java -jar target/hola-wildflyswarm-swarm.jar

stop application

Acess backend service

cd ../backend/

Buind and run

mvn clean package jetty:run

Test backend with curl

curl -X GET http://localhost:8080/api/backend?greeting=Hello

back to hola-wildflyswarm

cd ../hola-wildflyswarm

run with different port

mvn clean package wildfly-swarm:run -Dswarm.port.offset=1

Test service

http://localhost:8081

msa_java's People

Contributors

marcelomrwin avatar

Stargazers

Andre Ghigo avatar UpperApps avatar

Watchers

James Cloos 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.