PRA#02_SpringBoot-AlberteMartinez-CreateUserAPIRest#19
Open
AlberteMB wants to merge 22 commits intoAlbertProfe:masterfrom
Open
PRA#02_SpringBoot-AlberteMartinez-CreateUserAPIRest#19AlberteMB wants to merge 22 commits intoAlbertProfe:masterfrom
AlberteMB wants to merge 22 commits intoAlbertProfe:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PRA#02-SpringBoot: Create User API Rest
✅ Completed Tasks
UserentityUserController(REST API controller)UserRepositoryUserService📌 Implementation Details
1. Create
UserEntityUserandWord. Initially, I attempted to use Lombok's@Dataannotation, but it didn't work as expected, so I manually added all getters and setters.2. Create
UserControllerWordControllerincludes all standard CRUD methods.UserControllerimplements CRUD methods along with additional custom endpoints.3. Implement
UserRepositoryUserRepositoryandWordRepositoryextend JPA.UserRepositoryincludes custom queries for additional functionality.4. Configure H2 Database
create-dropstrategy since I didn't need persistent data.5. Develop
UserServiceUserServiceas an interface and then implemented it inUserServiceImpl.WordServiceandWordServiceImpl.6. Postman Endpoint Testing
🚀 Optional Enhancements
Custom Queries
UserRepository, integrated them intoUserServiceandUserServiceImpl, and exposed them via new endpoints inUserController.Additional Improvements
@Pattern.Below I add some screenshots.
Application.properties
Console - Deleting and Get all words.
Postman - AllUsers
Postman - User CreatedAfter
Postman - Delete User
Postman - Email Contains
Postman - Get all active users
Postman - Get User by ID
Postman - Get user by UserName
Postman - UserName Contains
Postman - User Count
Postman - User Created
Postman - Updating User - createdAt
Postman - All Words
Postman - Get word by ID
Postman - Updating Word - Active
Postman - Word created
Postman - Delete word