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. |
-
install prereqs:
-
Java 11 LTS (eg Adopt OpenJDK distribution)
-
Maven 3.6 or later (download)
-
-
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 webapppom.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.
-
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 webapppom.xml
-
Then specify the agent as a VM option:
-javaagent:lib/spring-instrument.jar