DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • OpenAPI From Code With Spring and Java: A Recipe for Your CI
  • Smart Deployment Strategies for Modern Applications
  • Optimizing High-Volume REST APIs Using Redis Caching and Spring Boot (With Load Testing Code)
  • Observability in Spring Boot 4

Trending

  • Improving DAG Failure Detection in Airflow Using AI Techniques
  • Lambda-Driven API Design: Building Composable Node.js Endpoints With Functional Primitives
  • Self-Hosted Inference Doesn’t Have to Be a Nightmare: How to Use GPUStack
  • The Third Culture: Blending Teams With Different Management Models
  1. DZone
  2. Coding
  3. Frameworks
  4. Spring Boot: Nice and Easy [Video]

Spring Boot: Nice and Easy [Video]

Want a fun and engaging intro to the whole Spring Boot ecosystem? Check out this live-coding session on a new episode of "Marco Codes."

By 
Marco Behler user avatar
Marco Behler
·
Apr. 21, 22 · Tutorial
Likes (8)
Comment
Save
Tweet
Share
10.6K Views

Join the DZone community and get the full member experience.

Join For Free

Ever looked for a comprehensive intro to Spring Boot that is fun and entertaining at the same time? Then have a look at this brand-new episode of the "Marco Codes" YouTube channel: Spring Boot - Nice & Easy.

In this video, we will build a tiny Google Photos-like clone with Spring Boot. Additionally, along the way, you'll learn plenty about Spring's Dependency Injection and MVC frameworks, Validation and File Handling, Spring Data and Databases, and you'll even deploy your application at the end. 

What’s in the Video?

Every new Spring Boot project starts with the question: How do I create my new project (hint: Spring Initializr) and what do I need to watch out for when setting up my project? Hence, we'll start off with that.

While the end goal of the video is to program a tiny Google Photos-like clone, we'll first continue with a quick win, Writing a Hello World @RestController, teaching you the very basics of Spring Boot such as project structure, classes, and beginner concepts.

Next, we'll be off to some real-life REST API Design. We want to store and retrieve photos, so we'll need to model our domain as Java classes. After modeling the domain, it's time to think about what our REST API would look like, what classes we need, and how to structure them and our project. That means we will get familiar with Spring Boot's mapping annotations, including @GetMapping, @PostMapping, or @DeleteMapping, and start sending very simple String messages via HTTP. 

Building stuff on the backend is, however, just one part of the coin. We'll also need a way to test our REST endpoints. A very simple way of doing that is by executing JavaScript inside your browser's developer console. We'll do that first, instead of resorting back to a full-blown HTTP client.

At some point, sending strings only takes you so far. We'll need to change our Spring Boot backend so it can handle JSON messages as well as validate those JSON messages so users cannot send invalid or even dangerous contents to make our server crash. Validation also means displaying error messages and we'll find out how you can handle those with Spring Boot.

With that many learnings under our belt, we'll dig into Spring Boots basics (i.e., dependency injection) in much more detail and talk about the pros and cons of different injection styles.

What would a real-life application be without database access? Let's change our application so that it stops saving photos on a hard disk, but instead saves them to a database. That way, you'll learn about Spring Data (JDBC) and the various ways you can access databases with Spring Boot. 

Last but not least, you'll also want to be able to deploy your application. Building final deployables with Spring Boot is rather simple and you'll learn how to run your Spring Boot application on any production server you like.

If you managed to watch the entire video, you'll be presented with some hints, tips, and resources, that will help you continue your Spring Boot learning journey on your own.  Check it out and let us know what you think! 

Spring Boot

Opinions expressed by DZone contributors are their own.

Related

  • OpenAPI From Code With Spring and Java: A Recipe for Your CI
  • Smart Deployment Strategies for Modern Applications
  • Optimizing High-Volume REST APIs Using Redis Caching and Spring Boot (With Load Testing Code)
  • Observability in Spring Boot 4

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook