
Spring Boot fundamentals illuminate building rest APIs and microservices, then master unit and integration testing with Mockito, MockMVC, JUnit, and Rust Template.
Install Java and Eclipse, configure system path, install the Spring Tool Suite plugin, and create an empty Spring Boot project from Spring Initializr to prepare for unit and integration testing.
Install the Spring Tools Suite plugin via Eclipse Marketplace and restart, then create an empty Spring Boot project with start.spring.io using Maven, and explore the Hello World service.
Explore the Spring Boot initializer project structure, including the application runner class, embedded Tomcat, and auto configuration, and learn how application properties, pom.xml, and source folders organize the app.
Build a restful hello world web service with Spring Boot by creating a get /greeting endpoint that uses a name query parameter to return a JSON greeting, testable via Postman.
Define a rest controller in spring boot, map a get /greeting with a request param name, and return a java bean greeting with id and content serialized to json.
Leverage Spring Boot's dependency injection with @Autowired to automatically create and inject beans, enabling REST APIs that return JSON by converting Java objects with Jackson.
Develop a library api by implementing add, update, delete, and retrieval of books with a MySQL database, and design the contract for endpoints in Spring Boot using MockMVC and Mockito.
Install and configure MySQL on your system, set a root password, and use MySQL Workbench to connect the database to your API via Java code on port 3306.
Configure MySQL in a Spring Boot app using application.properties, set data source URL, username, password, and driver, then leverage JPA repository to perform CRUD without manual SQL.
Enable MySQL dependencies and create a JPA entity bean mapping the library table with id, book name, isbn, and author, preparing for JPA CRUD via a repository.
Learn how to configure three JPA Hibernate properties for MySQL dialects, extend JpaRepository to create LibraryRepository for the Library entity, and leverage the primary key ID with findById.
Demonstrate how JPA retrieves data with find by ID, maps results to an entity, and performs CRUD operations in a Spring Boot app using an own repository interface.
Master crud operations in Spring Boot with JPA repository by saving, finding all, and deleting library records using entity getters and setters.
Design add book api contract in spring boot, accepting isbn, author, and book name; generate id at runtime, store in database, and return 201 with id or 202 if exists.
Create a post mapping add book endpoint in spring boot, accept a json body with @RequestBody, map to Library, save via JPA repository, and return proper status.
Learn to build an add-book response with a json body, status code 201 created, and custom headers using Spring Boot's ResponseEntity and HttpHeaders, including a message and book id.
Implement negative error handling for book creation in Spring Boot by checking existence via service; return 202 accepted or a 'book already exists' message.
Implement a get book by id rest controller using get mapping and path variable, retrieve book with repository.findById, and return json with 404 not found handling.
Implement a get books by author endpoint using a query parameter, creating a custom repository method find by author and wiring it into Spring Boot's JPA layer.
Learn to implement a JPA custom interface to retrieve books by author, define a signature in library repository custom, implement it in a class, and expose results as JSON.
Implement update book API logic with put mapping using a path variable id and request body; fetch, update, save via repository, and return the updated book via response entity.
Describe deleting a book via a Spring Boot delete API, using a payload id to locate and remove the record, returning a simple book is deleted string with HTTP 201.
Implement logging in Spring Boot by defining a logger factory, creating a logger, and using logger.info to log messages, with outputs to console and a dedicated log file.
Enable basic authentication for all rest services by adding spring boot starter security; access APIs with valid username and password, and observe 401 unauthorized when unauthenticated.
Learn to write unit tests and integration tests for Spring Boot code using JUnit, Mockito, MockMvc, and RestTemplate, with logical isolation, mocking dependencies, and H2 database.
Identify right candidates for unit testing and outline a build testing approach using a library service build id method, including handling old isbn numbers starting with z.
Learn to write unit tests for rest controller methods in spring boot by testing add book with a library object, asserting the response status and body with Mockito mocks.
Mock external dependencies with MockBean for library service and repository, use Mockito when-then-return to isolate the add book workflow and verify 201 created or accepted responses.
Validate the response body and status code of a spring boot controller by inspecting the add response object's id and message using mock mvc for tests simulating requests.
Learn to test controllers with mock mvc in Spring Boot by posting json payloads to /addBook, using an object mapper for json conversion, and validating json responses and status codes.
Learn to validate MockMVC responses using json path, end expect, and status checks, extract id values, and print results for unit tests with Mockito and JUnit.
Learn to build unit tests for a rest controller using mock mvc and mockito, mocking repository calls, asserting json array responses of library objects by author name.
Learn to unit test updating a book via Spring Boot controller using MockMvc and Mockito, mocking the repository and a get book by ID service call, and validating 200 response.
Build unit tests for rest controller methods with mock mvc and mockito to validate update book operations, verify 200 responses, and assert full response content with content().
Wrap up unit tests with Mockito, MockMVC, and JUnit by validating delete book through mocks, void method handling, and a book is deleted response with proper status and content checks.
Explore integration testing in spring boot, validating end-to-end communication between components and a mock database, using H2 to verify APIs and database interactions.
Configure H2 as a mock database for integration testing by adding the H2 dependency, creating a dev profile with application-dev.properties, and seeding data from a SQL file.
Set up a mock sql properties file and feed mock data using a dev profile with H2 and data.sql to validate integration tests.
Learn how to implement integration tests in Spring Boot using TestRestTemplate, differentiate unit and integration tests, and verify endpoint responses against a mock database while starting the server.
Learn how to validate API responses with integration tests using an H2 database seeded by data.sql, and JSON assertions to ensure data consistency across mock and real databases.
build a post integration test for a spring boot rest controller using rest template and http entity, asserting 201 status, json payload, and a unique header id.
This course is exclusively designed for beginners to understand Spring Boot fundamentals for Back end Rest Services/API Development and ability to perform white Box TESTING such as Unit Testing , Integration testing for the code using various Testing Frameworks like Mockito, MockMVC, Junit, Rest Template etc
This course is divided into 2 Phases
Phase 1:
Introduction to Back End Development - Phase 1 explains the fundamentals of Spring Boot including JPA to develop Rest Services/API’s /Micro Services for Real time Applications from Scratch.
No programming Experience needed to start with this course. I have covered everything needed to make you familiar with every concept taught in the course
Phase 2:
Unit/Integration Testing - After Solid Understanding of Rest Services development using Spring Boot in Phase 1, Phase 2 explains how to write Unit Tests and Integration Tests for the developed Phase 1 Code using Testing Frameworks like Mockito, MockMVC, Junit & RestTemplate with H2 Databases
All Testing (White Box Testing) Frameworks concepts are given with Scratch level explanation.
By end of this course, one can start building Rest Services/API’s with Spring Boot and write Solid Unit Tests and Integration tests to test their code as per Industry Standards
This course can be a great resource to Junior Developers and especially to SDET's to get involved into White Box testing Strategies to better understand code and write solid Unit/Integration Tests.