Sample application to demonstrate the Java plain handlers approach to use the Alfresco Java Event API.
It is a Spring Boot application that makes use of the Alfresco Java Event API Spring Boot Starter
to define sample EventHandler
's
that log information about the handled events.
To properly build and run the project in a local environment it is required to have installed some tools.
- Java 17:
$ java -version
openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM (build 17.0.4+8-LTS, mixed mode, sharing)
- Maven version 3.3 or higher:
$ mvn -version
Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T21:00:29+02:00)
- Docker version 1.12 or higher:
$ docker -v
Docker version 20.10.2, build 2291f61
$ docker compose version
Docker Compose version v2.28.1-desktop.1
This sample project local development environment is based on Docker, so a run.sh/run.bat
utility script has been included in order to build, run or stop
easily. This script will require execution permissions, so add it if it hasn't.
$ chmod +x run.sh
See run.sh
or run.bat
if you would like to know how each function exactly works.
Build all and run:
$ ./run.sh build_start
Only start the environment (without building it):
$ ./run.sh build_start
Stop all the containers of the environment:
$ ./run.sh stop
If you want to rebuild and redeploy only the sample app:
$ ./run.sh reload_sample