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
In Local Instance of MySQL create a schema name “labregister_local” and set it as default schema.
Open MySQL Workbench->Server->Data Import.
Go into dumps folder in the project cloned above to get the dump files to setup the database schema and populate default data.
Hint: \com-labregister-inventory\src\main\resources\db-scripts\dumps
Verification: in left panel should be able to see 2 tables under
labregister_local schema. The Database setup is done.
Application Compile and build
Open your favorite Terminal and run below commands.
go to root directory of the project which is cloned from the git
mvn clean install
mvn spring-boot:run
Application Test Using Postman:
Got to Postman >> Import >> Upload Files >> browse api-test folder of the project and import the .json file.
Hint: D:\labforward-assignment\com-labregister-inventory\src\main\resources\api-test.
Sample Request for 4 endpoints will be imported. To check the end-to-end connectivity from postman>>app>>database try hitting the Get Items by Category API.
If you get the below response, then the app is configured successfully.
Swagger implementation , Strategy of implementing the application could have been designing the swagger >> generate java code for endpoint their request/response body along with the validation .
Database password can be stored in key vault.
Code Review Comments
Create separate Request/Response bodies for endpoint practice of reusing of request/response body can be avoid
Custom Exception Handling code can be written in more structured manner and multiple errors can clubed to form single list of errors.
Include more test scenarios including the exception handling clauses.
Running sonar on the code and fix Blocker/Critical/Major Bugs.