https://github.com/apache/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.
https://github.com/apache/causeway-app-helloworld
ddd domain-driven-design graphql java naked-objects rad rapid-application-development restful-objects web-framework
Last synced: 8 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/apache/causeway-app-helloworld
- Owner: apache
- License: apache-2.0
- Created: 2019-07-08T10:40:28.000Z (about 6 years ago)
- Default Branch: v3-jpa
- Last Pushed: 2025-01-07T12:16:08.000Z (9 months ago)
- Last Synced: 2025-01-30T10:11:16.300Z (8 months ago)
- Topics: ddd, domain-driven-design, graphql, java, naked-objects, rad, rapid-application-development, restful-objects, web-framework
- Language: Java
- Homepage: https://causeway.apache.org/
- Size: 338 KB
- Stars: 9
- Watchers: 10
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= HelloWorld
:toc:
:toc-placement!:image:https://github.com/apache/causeway-app-helloworld/workflows/Build%20w/%20Maven%20+%20Jdk%208/badge.svg[]
image:https://github.com/apache/causeway-app-helloworld/workflows/Build%20w/%20Maven%20+%20Jdk%2015/badge.svg[]This is a minimal link:https://causeway.apache.org[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 link:https://github.com/apache/causeway-app-simpleapp[SimpleApp] starter app.It provides more structure and includes examples of fixtures, unit tests, integration tests, and BDD (Cucumber) specs.
====toc::[]
== Quick start
* install prereqs:
** Java 11 LTS (eg link:https://adoptopenjdk.net/[Adopt OpenJDK] distribution)
** Maven 3.6 or later (http://maven.apache.org/download.cgi[download])
* download and unzip
+
[source,bash]
----
APP=helloworld
BRANCH=masterREPO=causeway-app-$APP
curl "https://codeload.github.com/apache/$REPO/zip/$BRANCH" | jar xv
mv $REPO-$BRANCH $REPO
cd $REPO
----* Build using Maven:
+
[source,bash]
----
mvn clean install
----* Download the `spring-instrument.jar` for load-time weaving (discussed in more detail xref:#orm-support[below]):
+
[source,bash]
----
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:
+
[source,bash]
----
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]
== ORM Support// EclipseLink : START
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:
+
[source,bash]
----
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:
+
[source,bash]
----
-javaagent:lib/spring-instrument.jar
----// EclipseLink : END
// DataNucleus : START
//This version of the application 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:
//
//[source,bash]
//----
//mvn -pl module-simple datanucleus:enhance -o
//----
//
//This is useful to know if the application or integration test fails to bootstrap, complaining of "unenhanced entities".
//
//TIP: You can also use `enhance-all.sh`// DataNucleus : END