
Explore API driven design with Java Spring Boot for microservices, building REST endpoints, documenting with Swagger, and integrating MongoDB, Redis, Rabbit, Twilio, Bitly, and Docker deployment.
Set up Java 1.8 SDK and JDK, install IntelliJ community edition and Maven, use Spring Initializr to create a Java Maven Spring Boot project, and run on port 8080.
Create your first rest controller in Spring Boot by defining a rest controller class, marking it for component scanning, and setting the base path to /api/v1 with a mapping.
Build a simple rest api with Spring Boot by exposing a get endpoint /api/v1/users that returns a string via a rest controller and request mapping.
Discover how to use the Postman tool to send a get request to the same url, view http status, timing, and headers from request and response.
Create a user DTO with id and name, update the API to return the DTO instead of a string, and use Lombok to auto-generate getters and setters.
Change the server port by editing the application.properties file, setting server.port to 8100, then restart to listen on the new port and verify via Postman.
Set the content-type for post requests, send a JSON body, and receive an application/json response in a Spring Boot API, with server-side handling.
Create a post mapping for /users, parse a request body into a new user DTO, generate a UUID-based ID, and return a ResponseEntity with 201 created and the user DTO.
Enable case insensitive properties in Spring Boot by setting spring.jackson.mapper.case-insensitive-properties=true to map names in any case, enabling seamless integration with C# and other languages.
Implement a simple put api in a spring boot app. Add a put mapping with an id path variable to update the user via updated user dto and return it.
Learn to build a delete API in Spring Boot, using a delete mapping for /users/{id}, a response entity, and an empty JSON body that returns HTTP 200.
Enable logging in the spring boot api using lombok and logback, replacing log4j. Log info for get user started/completed and create user started/completed, including new user requests.
Create an in memory persistence layer for a Spring Boot Java API with a private static final list of DTOs, enabling get all, get by id, and CRUD operations.
Implement api key security by loading the key from application properties, injecting it, validating the header key to return 403 with a json error when invalid, and support multiple keys.
Implement a high-priority Spring Boot access log filter that logs ip, method, uri, content type, status, elapsed time, and x-forwarded-for for api requests; test with postman.
Run the fat jar from the command line using java -jar, verify API calls on port 8100 with post and get, and observe output and logging in the console.
Externalize your application.properties to configure Spring Boot via command line or environment variables. Set spring.config.location to a properties file for local development.
Run an AB Apache benchmark load test on your spring boot microservices API to measure requests per second, concurrency impact, and how heap and stack settings influence performance.
Learn to monitor a Spring Boot API with the actuator starter, configure health details, and view metrics (memory, disk) and database status via the health endpoint on port 8100.
Add and configure dependencies in the pom for Spring Boot starter JPA and MySQL connector 8.0.32, reload the Maven project, and configure the data source.
Create a local MySQL database via the command line, name it ESP demo, switch to it, and show that no tables exist before configuring the application in the next video.
Configure the spring data source in the application properties to connect to a MySQL database at 127.0.0.1:3306 with the ESP demo, enabling public key retrieval and SSL false.
Refactor main controller to user rest controller, define a user service interface for get all users and get user by id, and implement constructor injection with logging on port 8100.
Refactor the user domain by creating a user entity mapped to the users table with a UUID id, first name, last name, email, and password; adjust dto placement.
Create a user repository with Spring Data JPA, inject into the service, implement get all users and create user flows, and manage users via the user entity.
Learn how to map between user entities and dtos in a spring boot application using model mapper, including creating config and converter beans and wiring them into services and controllers.
Fetch a user by id through the controller, map to a dto, and return 404 if not found, while wiring up a get by email using a custom repository query.
Finish implementing update and delete user endpoints in the Spring Boot API, using the user service and repository for DTO mapping and end-to-end validation.
Enable spring boot validation with the spring starter, use @Valid on requests, validate DTO fields with not null, not blank, and size, and return 400 errors via an exception handler.
Learn to document a Spring Boot API with Swagger Open API, configure API docs, and explore the Swagger UI for get, post, put, and delete endpoints with API key authentication.
Build a Spring Boot Bitly integration by creating a Bitly REST controller, a Bitly service, and DTO objects to shorten long URLs using the Bitly Java API.
Learn to integrate Twilio with a Spring Boot API by building an sms endpoint, wiring a post mapping with a sms request model, and configuring Twilio credentials and outgoing numbers.
Explore MongoDB basics and NoSQL document databases; learn Java integration with Spring Boot, JPA, and Mongo template, including insert, update, save, delete, and 2D sphere geo queries.
Course Description
Learn the basic concepts of Java Spring Boot API's to include HTTP based REST with JSON payloads. Learn how to create a working system with Java using the Spring Boot 2.7 framework and Open API 3.0 / Swagger to create API documentation. Learn how to create an API that connects to MySQL and MongoDB. We use Redis and Rabbit MQ in our examples and show how to setup and integration with these technologies. We walk thru creating some simple API's with interfaces such as Twilio and Bitly and follow thru with deployment onto a Docker server. This development is presented on a Mac OSX with Java 8.
Build a strong foundation in API development with Java and Spring Boot the number one technologies used by fortune 100 companies today. This course helps you understand and implement API's and Microservices using Java and Spring Boot with lots of Pro Tips and Tricks for an experienced developer.
Note: You may ask why I focus on Spring Boot 2.7 and Not Spring Boot 3 or why I do not focus on Java 19, etc. It is simple, most of the companies that I see today still use Java 8 and Spring Boot 2.x, Spring Boot 3 requires Java 17/19, that simple. People want to use official Java from Oracle, other then Java 8 you MUST pay for Oracle Java or use Open JDK which may be a concern for many companies. In addition to these basic issues, a significan amount of existing libraies do NOT work with newer versions of Java and Sprint Boot 3. Simply the change from Java EE 8 to Jakarta EE 9 breaks almost all of your exsiting libraries.
You will also see how services connect in a Microservice solutions and learn many gotchas to watch for.
Java 8 programming language
Spring Boot 2.7
IntelliJ Ultimate
Maven 3
Swagger
Mac OSX 11.7
Docker Containers
Linux Command Line
MySQL
MongoDB
Redis
Rabbit MQ
Twilio
Bitly
Professional skills and experience from a Java Architect with over 20 years experience from startups to fortune 100 companies.
Learn the fundamentals but also tips and tricks of the experts. Learn about the different type of API end points and how to create a full end to end solution.
We will walk thru the project setup and all required elements to create a full end to end API server.
Content and Overview
This course explains key technology concepts of API's with REST and JSON technology in a Java system. We show development from start to finish to include deployment on a live production server not just a test machine.
What am I going to get from this course?
Detailed knowledge of how to create Java based REST/JSON API's
Learn how to setup a Maven project in Eclipse
Learn how to document your API's using Swagger.
Learn how to use MongoDB as the back end for API's.
Teaching by example, several hands on examples showing every detail to the smallest degree from starting a new application to deploying it in production.
Access to Instructors GitHub account with many extras and examples.
If you don't have a production server device don't worry, we show you how to test everything on your local computer.
Note: Development is all described on a Mac OSX notebook, Windows is not address. Java is a portable language and all the tools described in this class are available on Java as well but no intention is made to describe how to setup them up of use the Windows versions.