- Open the folder of the project.
- Open a terminal and run the following command to start kafka container :
docker-compose up -d
-
Use the
pwdcommand in the terminal to get the current directory path and paste it into thefile.pathproperty in theapplication.propertiesfile. -
Open the
OfferServiceImplclass and locate the@Qualifierannotation.
- If you set the value to
"impl1", the app will use H2 database to persist data. - If you set the value to
"impl2", the app will throw an event to Kafka when an offer is created.