java-tutorials/lightrun/README.md

41 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2022-05-17 11:07:21 -04:00
# Lightrun Example Application - Tasks Management
This application exists as an example for the Lightrun series of articles.
## Building
2022-05-19 05:14:05 -04:00
2022-05-17 11:07:21 -04:00
This application requires [Apache Maven](https://maven.apache.org/) and [Java 17+](https://www.oracle.com/java/technologies/downloads/).
Building the code is done by executing:
2022-05-19 05:14:05 -04:00
2022-05-17 11:07:21 -04:00
```
$ mvn install
```
2022-05-19 05:14:05 -04:00
2022-05-17 11:07:21 -04:00
from the top level.
## Running
2022-05-19 05:14:05 -04:00
2022-05-17 11:07:21 -04:00
The application consists of three services:
2022-05-19 05:14:05 -04:00
2022-05-17 11:07:21 -04:00
* Tasks
* Users
* API
These are all Spring Boot applications.
The Tasks and Users services exist as microservices for managing one facet of data. Each uses a database, and utilise a JMS queue between them as well. For convenience this infrastructure is all embedded in the applications.
This does mean that the startup order is important. The JMS queue exists within the Tasks service and is connected to from the Users service. As such, the Tasks service must be started before the others.
2022-05-19 05:14:05 -04:00
Each service can be started either by executing `mvn spring-boot:run` from within the appropriate directory. Alternatively, as Spring Boot applications, the build will produce an executable JAR file within the `target` directory that can be executed as, for
example:
2022-05-17 11:07:21 -04:00
```
$ java -jar ./target/tasks-service-0.0.1-SNAPSHOT.jar
```
### Relevant Articles"
- [Introduction to Lightrun with Java](https://www.baeldung.com/java-lightrun)