Skip to content

This is a simple Payara MicroProfile project by using maven and gradle build tools compiling and running on top of Java 8 and Java 11. Gradle payara-micro uber-jar build automation (see payara.gradle build file for details) Read more about micro-profile initiative: https://microprofile.io

License

Notifications You must be signed in to change notification settings

daggerok/payara-micro-example

Repository files navigation

payara-micro-example Build Status

This is a simple Payara MicroProfile project by using maven and gradle build tools compiling and running on top of Java 8 and Java 11

features

  • payara-micro

  • fatJar / uberJar

  • JPA eclipselink

  • H2 database

  • Liquibase

  • slf4j logging

build ROOT.war and deploy it into *-microbundle.jar
./gradlew clean bundle

ls -lah ./build | grep jar
run (with remote debug for example)
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 \
          -Djava.net.preferIPv4Stack=true \
            ./build/libs/*-microbundle.jar
test: post new data
http :8080/v1 string=one
http :8080/v1 string=two
http :8080/v1 string=3
test
HTTP/1.1 202 Accepted
Content-Length: 0
Server: Payara Micro #badassfish
X-Frame-Options: SAMEORIGIN
test
http :8080/v1
test
HTTP/1.1 200 OK
Content-Length: 17
Content-Type: application/json
Server: Payara Micro #badassfish
X-Frame-Options: SAMEORIGIN
verify
[
    "two",
    "one",
    "3"
]
using gradle is very similar to maven
./gradlew bundle

./gradlew start
# or
java -jar build/libs/*-microbindle.jar
Tip
see Payara Gradle build file for details.
maven usage
./mvnw -Pbundle

./mvnw -Pstart
# or
java -jar target/*-microbundle.jar

About

This is a simple Payara MicroProfile project by using maven and gradle build tools compiling and running on top of Java 8 and Java 11. Gradle payara-micro uber-jar build automation (see payara.gradle build file for details) Read more about micro-profile initiative: https://microprofile.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published