Java 17
Maven 4.0.0
MySql Ver 8.0.32
Spring Boot 3.0.5
IntelliJ IDEA 2023.1 (Community Edition)
- It consists of User ,Expense, Product ,AuthToken and other entity classes along with their data members and member functions
- Used @Table and @Entity annotations inside the entity class.
- Used Lombok to reduce boilerplate code for pojo class.By using Lombok annotations like @Data, @NoArgsConstructor, @AllArgsConstructor getters and setters for those object generate automatically.
- Used @OneToOne, and @ManyToOne annotation to perform one to one mapping between Employee and Address.
- It consists of UserController ,UserController, PostController and CommentController classes in which used the annotations like @RestController to annotate the class as Controller.
- Used annotation @GetMapping , @PostMapping , @PutMapping , @DeleteMapping to map the HTTP web requests to the specific handler methods.
User's API References
- User SignUp:
http://16.16.218.61:8080/user/signup
- User SignIn:
http://16.16.218.61:8080/user/signin
- Add Expenses via User authentication:
http://16.16.218.61:8080/user/expenses/email/{email}/token/{token}
- Get All Expenses via User authentication:
http://16.16.218.61:8080/user/expenses/email/{email}/token/{token}
- Update Expense By id via User authentication:
http://16.16.218.61:8080/user/expenses/expenseId/{expenseId}/amount/{amount}
- Delete Expense By id via User authentication:
http://16.16.218.61:8080/user/expenses/email/{email}/token/{token}/expenseId/{expenseId}
Product's API References:
- Buy Products via User's authentication:
http://16.16.218.61:8080/product/email/{email}/token/{token}
- Get Products By Date via User authentication:
http://16.16.218.61:8080/product/email/{email}/token/{token}
- It consists of UserService, ExpenseService, ProductService and TokenService classes in which provide some business functionalities of every handler methods.
- Used @Service annotation to indicate that a class belongs to the service layer.
- Used @Transactional annotation to separate transaction management code from the code for business logic on the update and delete methods.
- It consists of UserDao, ExpenseDao , ProductDao and TokenDao interface that extends CrudRepository which is interface for generic inbuilt CRUD operations on a repository for a specific type. Usually represent the database access layer in an application.
- Used Iterable for User and Post to manage the data of entity classes by performing CRUD operations.
- Used @Repository annotation is used to indicate that the class provides the mechanism for storage, retrieval, search, update and delete operation on objects.
- Used @Modifying annotation wrote named parameters query using @Query annotation to insert, update, or delete an entity.
Used List<O>
to store objects for entity classes.
- In this project I performed CRUD operation like add,get,delete and update.
- The aim of this project to create expense-tracker-api application uses authentication tokens to secure user data and ensure that only authenticated users can access certain features.
- Used interface JpaRepository for generic CRUD inbuilt operations like save,saveAll,updateById, etc.
- Used our own custom finder methods and wrote operations using custom queries.
- Implemented authentication for User SignUp, SignIn and to create Post and manage their profile information
- It allows users to sign up, sign in, and manage their expenses. Users can also buy products and get sort the product by date.