
Master Spring Boot by building a rest api that talks to an external http api and stores user data in a local MySQL database, illustrating end-to-end microservice concepts.
Discover why Spring Boot speeds up production-grade app development with its flexibility and industry validation. Leverage easy configuration and Spring Cloud to build microservices, reactive, and event-driven apps.
Build a spring boot application from scratch using IntelliJ and gradle with spring boot starter web. Create a controller with a get mapping to return a user string on localhost:8080.
Explore Spring Boot controllers, mapping requests, and returning html or json, tested with browser and Postman. Build a user model and post data with @RequestBody using Jackson for serialization.
Learn how to return accurate http status codes in Spring Boot controllers using ResponseEntity, including 200, 202, 404, and 204, and explore http methods like get, post, and delete.
Learn how to move application logic from a rest controller into a dedicated service in spring boot, inject the service via an interface and implementation to enable decoupling and testing.
Call an external API from a Spring Boot app using the World Time API to fetch UTC creation times and map the JSON to a time model.
Explore managing endpoints and constants in Spring Boot with a dedicated time API config using configuration properties, injected via dependency injection, and configured in application.yaml.
Configure a spring boot microservice to connect to a dockerized mysql database by replacing the in-memory user map with a mysql table and setting up the database and table.
Configure a Spring Boot app to access MySQL with Spring Data JPA, create a user entity and repository, map between entity and model, and perform end-to-end CRUD with transactional deletes.
Intro
This course is everything you need to get started with Spring-Boot framework in Java, which is the most popular JVM-based web framework for building microservices and backend systems, used by many big-tech companies.
Java is a really great language and provides a number of features out of the box, but if you want to build a REST API in pure Java, it might not be so straight-forward.
For this reason, developers have created frameworks that allows you to build APIs fast, with best-practices in terms of code design and performance/efficiency, and Spring-Boot is such a great framework.
Why do you need to learn Spring-Boot Framework?
Spring-Boot is so popular because of the following:
It allows you to create create production-grade applications very fast
It promotes a well designed code-base
It integrates with external systems seamlessly
It has a big open source community that constantly improves it
And many other reasons
Having Spring-Boot in your skillset as a Java developer, will allow you to:
Be more competitive in the job market
Be more productive because you'll read and write code faster (and better) by recognising and applying well-established design patterns embedded into Spring-Boot
Be able to tackle more technical opportunities since many open source projects use Spring-Boot
Overall, this framework will take you a step further in your Software Engineering career and learning it as soon as possible is probably one of the best strategic moves that you can do for developing your technical expertise.
What you will learn in this course
This course is about 1 hour long, but be aware that it is jam-packed with information. In a nutshell, in this course we're going to create a plain REST API that interacts with a MySQL database to store user data, and also with an external HTTP API, to grab some external data.
A non-exhaustive list of things you're going to learn in this course is the following:
What is Spring-Boot and how it compares to a traditional command-line Java application
How can you import Spring-Boot framework in an empty IntelliJ Idea project
How can you find the right Spring dependencies on the web
How can you create a REST Controller and receive some data via HTTP
How can you configure your REST Controller to send data back and follow best practices
How can you create Services in Spring-Boot
How to use Spring-Configuration mechanism
What is Dependency Injection and how does it work
How can you call an external API via HTTP from your application, using a HTTP Client
How can you configure the Jackson deserialization to extract only the data you need
How can you create and configure a MySQL database using Docker
How can you configure a Spring-Boot application to connect and interact with the MySQL database
How can you use Transactions in Spring-Boot to ensure atomic operations on the database
This course is meant to guide you through this framework by showcasing how can you build a simple application that connects to other 2 systems, from an end-to-end perspective. It's highly practical, because this is the best way to learn any new technology, by playing with it as much as possible
To set the right expectations: this is not a complete Spring-Boot course, it doesn't cover all possible configurations and dependencies that Spring-Boot provides. Instead, it's a course highly focused on building an application similar to a microservice, and the main goal is to give you a taste on how Spring-Boot looks as a web framework and what is the developer experience for using it.
Prerequisites for this course
This course is addressed to beginner Java Developers, Computer Science/Engineering students, existing developers that want to learn something new and of course, to anyone who wants to learn Spring-Boot.
The only prerequisites for this course are the following:
IntellIJ IDEA community (free) edition
Basic Java knowledge (classes, interfaces, generics)
Willingness to learn :-)
In the last 2 lectures I'm going to use a terminal and Docker, so if you are familiar with those it will be easier to follow along, but they're not required as I'm explaining any command that I run step-by step.
Thank you for being here and let's jump in the first lecture!