You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://redis.com/[Redis] is a software project that implements data structure servers.
10
+
It is open-source, networked, in-memory, and stores keys with optional durability.
11
+
12
+
The project is configured to reach out the Redis Cluster with the following configuration defined on the file `src/main/resources/META-INF/microprofile-config.properties`. More info about it, check the following link: https://github.com/eclipse/jnosql-databases?tab=readme-ov-file#configuration-14
*PS:warning:* Pay attention to that when you try to set up your own Redis instance.
19
+
20
+
== Using Docker Compose
21
+
22
+
The easier way to execute this project is to use the provided docker-compose.yaml file in the root directory.
23
+
You can run it by performing the following command:
24
+
25
+
[source, bash]
26
+
----
27
+
docker-compose up -d
28
+
----
29
+
30
+
== Run the code
31
+
32
+
The generation of the executable jar file can be performed by issuing the following command
33
+
[source, bash]
34
+
----
35
+
mvn clean package
36
+
----
37
+
38
+
This will create an executable jar file **microprofile-liberty-redis.jar** within the _target_ maven folder. This can be started by executing the following command
39
+
40
+
[source, bash]
41
+
----
42
+
java -jar target/microprofile-liberty-redis.jar
43
+
----
44
+
45
+
=== Liberty Dev Mode
46
+
47
+
During development, you can use Liberty's development mode (dev mode) to code while observing and testing your changes on the fly.
48
+
With the dev mode, you can code along and watch the change reflected in the running server right away;
49
+
unit and integration tests are run on pressing Enter in the command terminal; you can attach a debugger to the running server at any time to step through your code.
50
+
51
+
[source, bash]
52
+
----
53
+
mvn liberty:dev
54
+
----
55
+
56
+
57
+
58
+
59
+
To launch the test page, open your browser at the following URL
60
+
61
+
[source, text]
62
+
----
63
+
http://localhost:9080/index.html
64
+
----
65
+
66
+
67
+
=== Specification examples
68
+
69
+
By default, there is always the creation of a JAX-RS application class to define the path on which the JAX-RS endpoints are available.
70
+
71
+
Also, a simple Hello world endpoint is created, have a look at the class **HelloController**.
72
+
73
+
More information on MicroProfile can be found [here](https://microprofile.io/)
74
+
75
+
76
+
=== Config
77
+
78
+
Configuration of your application parameters. Specification [here](https://microprofile.io/project/eclipse/microprofile-config)
79
+
80
+
The example class **ConfigTestController** shows you how to inject a configuration parameter and how you can retrieve it programmatically.
0 commit comments