Use proper logging instead of printStackTrace().
Logging has the concept of priority (error, debug, warn, etc.), which printStackTrace() doesn't have.
No one will see printStackTrace(), as it goes to console.
Log messages can be aggregated by several commercial tools. Not so easy with printStackTrace().
https://github.com/Bipal123/Fast-Food-App/blob/619db364c35d1237401a456ff02b4ac1fe0481c7/src/main/java/com/enterprise/fastfoodapplication/controllers/OrdersController.java#L42
Use proper logging instead of printStackTrace().
Logging has the concept of priority (error, debug, warn, etc.), which printStackTrace() doesn't have.
No one will see printStackTrace(), as it goes to console.
Log messages can be aggregated by several commercial tools. Not so easy with printStackTrace().
https://github.com/Bipal123/Fast-Food-App/blob/619db364c35d1237401a456ff02b4ac1fe0481c7/src/main/java/com/enterprise/fastfoodapplication/controllers/OrdersController.java#L42