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

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Low-Code Development: Leverage low and no code to streamline your workflow so that you can focus on higher priorities.

DZone Security Research: Tell us your top security strategies in 2024, influence our research, and enter for a chance to win $!

Launch your software development career: Dive head first into the SDLC and learn how to build high-quality software and teams.

Open Source Migration Practices and Patterns: Explore key traits of migrating open-source software and its impact on software development.

Related

  • GenAI: Spring Boot Integration With LocalAI for Code Conversion
  • Custom Health Checks in Spring Boot
  • The Magic of Quarkus With Vert.x in Reactive Programming
  • Tackling Records in Spring Boot

Trending

  • How To Plan a (Successful) MuleSoft VPN Migration (Part II)
  • Benchmarking Java Streams
  • GBase 8a Implementation Guide: Performance Optimization
  • 7 Linux Commands and Tips to Improve Productivity
  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
DZone Core CORE ·
Apr. 21, 22 · Tutorial
Like (8)
Save
Tweet
Share
9.1K 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

  • GenAI: Spring Boot Integration With LocalAI for Code Conversion
  • Custom Health Checks in Spring Boot
  • The Magic of Quarkus With Vert.x in Reactive Programming
  • Tackling Records in Spring Boot

Partner Resources


Comments

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: