/isis-app-helloworld

App to get you up and running quickly with Apache Isis

Primary LanguageJavaApache License 2.0Apache-2.0

HelloWorld

badge badge

This is a minimal Apache Isis application, intended as a starting point to learn what the framework is all about.

Tip

For real-world development, we recommend you instead start with the SimpleApp starter app.

It provides more structure and includes examples of fixtures, unit tests, integration tests, and BDD (Cucumber) specs.

Table of Contents

Quick start

  • install prereqs:

  • download and unzip

    APP=helloworld
    BRANCH=master
    
    REPO=isis-app-$APP
    curl "https://codeload.github.com/apache/$REPO/zip/$BRANCH" | jar xv
    mv $REPO-$BRANCH $REPO
    cd $REPO
  • Build using Maven:

    mvn clean install
  • Run from Maven:

    mvn spring-boot:run
  • Browse to http://localhost:8080.

  • Login using:

    • username: sven

    • password: pass

    The app runs with H2 running in-memory.

  • Build a Docker image

    export REVISION=...                 #(1)
    export DOCKER_REGISTRY_USERNAME     #(2)
    export DOCKER_REGISTRY_PASSWORD     #(3)
    
    mvn -pl webapp jib:build
    1. used as the image tag

    2. Docker Hub registry username

    3. Docker Hub registry password

      To push to another container registry, change the <image> tag in the pom.xml

Development

Apache Isis uses DataNucleus as its ORM, which requires that any entities are "enhanced", a post-compile process.

Normally this is done as part of a "mvn clean install", but the entities can also be enhanced explicity using:

mvn datanucleus:enhance -o

This is useful to know if the application fails to bootstrap, complaining of "unenhanced entities".

Tip
You can also use enhance-all.sh