/causeway-app-helloworld

Apache Causeway™ software is a framework for rapidly developing domain-driven apps in Java. This repo contains a sample app to help you quickly learn the essentials of the framework.

Primary LanguageJavaApache License 2.0Apache-2.0

HelloWorld

badge badge

This is a minimal Apache Causeway 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=causeway-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
  • Download the spring-instrument.jar for load-time weaving (discussed in more detail below):

    mvn dependency:get -DgroupId=org.springframework -DartifactId=spring-instrument -Dversion=XXX

    Change "XXX" to the value that ${spring-framework.version} resolves to in the webapp pom.xml

  • Run using Maven:

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

  • Login using:

    • username: sven

    • password: pass

    The app runs with H2 running in-memory.

ORM Support

This version of the application uses EclipseLink JPA as its ORM, configured with load-time weaving. This requires that the application be run with a Java agent.

The spring-boot plugin is configured to run with this agent already. If you want to run from an IDE:

  • first, you might wish to copy the file locally:

    cp ~/.m2/repository/org/springframework/spring-instrument/XXX/spring-instrument-XXX.jar lib/spring-instrument.jar

    Change "XXX" to the value that ${spring-framework.version} resolves to in the webapp pom.xml

  • Then specify the agent as a VM option:

    -javaagent:lib/spring-instrument.jar