Question: Task 1 : Project Setup Initialize a Spring Boot Project: Use Spring Initializer or your preferred IDE to create a new Spring Boot project. Include
Task : Project Setup
Initialize a Spring Boot Project:
Use Spring Initializer or your preferred IDE to create a new Spring Boot project.
Include dependencies for MySQL JPA, Security, Lombok, and Thymeleaf.
Configure Database:
Set up your application.properties to connect to a MySQL database.
Create a database named coffeeshopdb.
Task : Entity and Repository
Create Entity:
Design an entity class representing a coffee product with attributes like id name, price, etc.
Use Lombok annotations for generating getters, setters, and constructors.
Implement Repository:
Create a JPA repository interface for the coffee product entity.
Include methods for basic CRUD operations.
Task : Security and Authentication
Security Configuration:
Implement security configurations to secure your application.
Create a custom UserDetailsServiceImpl for user authentication.
Admin User:
Create an admin user in the database with roles that allow access to product management functionalities.
Task : Web Pages and Controllers
Thymeleaf Templates:
Develop Thymeleaf templates for displaying the list of coffee products, product details, and forms for addingediting products.
Controller Methods:
Implement controller methods for handling requests related to coffee products eg listing, adding, editing, deleting
Use appropriate security annotations to restrict access.
Task : JUnit Testing
Write JUnit Tests:
Develop JUnit tests for each method in your service and repository classes.
Ensure that tests cover positive and negative scenarios.
Task : Additional Features
Mandatory: Styling and Validation:
Add CSS styles to improve the look and feel of your web pages.
Implement form validation for input fields in your Thymeleaf templates.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
