/gradle-and-java8

Research and POC with Gradle and Java 8

Primary LanguageJava

Gradle & Java 8 Project

1. Continuous Integration

2. Research and POCs with:

  • Gradle 4.x

    • Multimodule application

    • Quick build lifecycle

  • Java 8

  • Spring Software

    • Boot 2.0.x

    • Springframework 5.0.x

  • REST API

  • Continuous Integration

  • Software testing

    • Spock

    • JUnit5

    • Jacoco

3. Gradle:

  • gradle wrapper --gradle-version 4.7

  • ./gradlew bootRun → run webapplication

  • `./gradlew bootJar → package webapplication

  • java -jar application/build/libs/application-1.0.0-SNAPSHOT.jar → run packaged webapplication

  • ./gradlew repository:jacocoTestReport→ jacoco test report

  • ./gradlew test --fail-fast -t → rapid test development

4. Check server running

curl http://localhost:8081/mybank/
http http://localhost:8081/mybank/

5. Resource Operations

list accounts
curl http://localhost:8081/mybank/accounts
http http://localhost:8081/mybank/accounts
create account
echo '{"alias":"account-alias-1","balance":"150.00"}' | http http://localhost:8081/mybank/accounts
curl -d '{"alias":"account-alias-2","balance":"10.00"}' -H "Content-Type: application/json" -X POST http://localhost:8081/mybank/accounts