Skip to content

phamhongphuc1999/JavaPractice

Repository files navigation

Java Practice

Project

Id Project Description
1 code Simple basic java code
2 simple-api Simple java api
3 word Word app
3 producer Simple kafka producer
4 consumer Simple kafka consumer
5 utility Utility
6 order-service Order service
7 inventory-service Inventory service

Event driven microservices simple app

The app includes project 5, 6 and 7 in the list of projects.

1. Setup

  • Ensure you run database already (including creating database and optionally creating tables and initializing data for tables)(read more in the next section).
  • Build utility first, it is used by others so you alway ensure it is built first.

Setup database

    1. Run docker container
make edmysql
    1. Execute container
docker exec -it ed_sql_container bash
    1. Login
mysql -u root -p

Then enter java as password

    1. Switch to database
use java_app;
    1. Check whether tables were created or not
show tables;

if tables were not created, create them.

Event-driven small app

  1. Run kafka server
make conduktor
  • I create kafka by conduktor docker, after running successfully, you can go http://localhost:8080/ to see Conduktor dashboard. (email and password can be modified in CDK_ADMIN_EMAIL and CDK_ADMIN_PASSWORD)

  • Noticed that Bootstrap server runs in 127.0.0.1:19092

References

Issues

can't import packages on VSCode

    1. Open search box
    1. Search: Java: clean Java Language Server Workspace

Releases

No releases published

Packages

No packages published