---
# System prepended metadata

title: '01.1-SpringBoot basics-Lesson1: Introduction to Spring Boot'
tags: [Udacity]

---

# 01.1-SpringBoot basics-Lesson1: Introduction to Spring Boot
###### tags: `Udacity`
[ToC]

# 01 Good Luck!
{%youtube 25HzguEoP5s%}

# 02 Prerequisites
{%youtube 3wJW64VN5GI%}
To get the most out of this course, you should already be familiar with the basics of Java, SQL, and IDEs.

If you're looking to get started with Java, Udacity has a free [Java Programming Basics course](https://www.udacity.com/course/java-programming-basics--ud282), which as a bonus introduces IntelliJ IDEA as an IDE. Another resource is the [Java Tutorials](https://docs.oracle.com/javase/tutorial/index.html) from Oracle. These are also an excellent reference, especially if you're already familiar with another language and just need to know what's different in Java. That being said, we do expect you to be very familiar with Java in this course, so proceed at your own risk if you're attempting to come here from another language!. If SQL is a no for you: check out Udacity's free [Intro to Relational Databases](https://www.udacity.com/course/intro-to-relational-databases--ud197) course, where you'll learn both to design and query SQL databases.

If IntelliJ IDEA is new territory, you can take a look at their [feature overview](https://www.jetbrains.com/idea/features/) to get a sense of what's possible. Note that we will be using the open-source Community Edition of IntelliJ in lessons. If you want to pay for the Ultimate Edition, you are free to, but it is not required. If IDEs are new to you entirely, check out the last lesson of Udacity's free [Java Programming Basics course](https://www.udacity.com/course/java-programming-basics--ud282) for an introduction.

# 03 Introduction
**Introduction to Java Web Development with Spring Boot**
{%youtube 9O5ywNRPecE%}
Web Development means building web applications, and in a standard web application, there are three main components:
* Data Storage
* Application Logic
* Client Access
By the end of the course, you're going to learn how to build and manage each of those components in Java using Spring Boot.

**Data Storage**
Some of those beans will be responsible for interacting with the database. We will be using a SQL database called H2, which is an in-memory SQL database hosted by Spring Boot. You'll learn to use MyBatis, a Java library for database interaction, to generate data-access beans, which will be used by other services in your application logic to satisfy client requests.

**Application Logic**
Application logic manages client access and database interaction. For this course, you're going to learn how to use Spring Boot to maintain a collection of beans, which are small components of application logic that can interact with each other to carry out complex tasks.

**Client Access**
The client that will access our application is a web browser, which will send HTTP requests to our app and usually expects HTML in return. Using Spring MVC and Spring Security, libraries provided to us by Spring Boot, you will learn to create special beans called controllers that you can configure to respond to client requests and generate HTML responses. Controllers act as the entry points of your application, from a client's perspective.

![](https://i.imgur.com/bpv0GZz.png)
Architecture of a Web Application: Notice which Spring concepts intersect with which roles!

# 04 Why Java Web Development
Why Java Web Development Matters
{%youtube k-cTY5niqNc%}
Learning web development is valuable because it's how the digital apps and services that we use every day are built. Being able to visualize the architecture of a web application will make you a better developer and give you tools to use when turning an app idea into reality.

Learning Java is valuable because it's a widely-used industry mainstay, and it has a massive community of developers and open-source projects, like Spring Boot. Learning Spring Boot matters because it's a core Java library that supports and defines language-wide best practices. Mastery of Spring will make you an excellent Java developer and expose you to the Java-standard solutions to a wide range of common problems. Learning to recognize those common problems will make you a better developer. Wherever you go, whatever language you use, the same problems will arise, and you'll know what kind of solutions to look for.

# 05 Business Stakeholders
Who are the Stakeholders?
{%youtube SZ7VPAzBVpc%}
On a professional development team, many people are involved in the choice of language and framework:

* Developers who write the code.
* Testers who write and run tests.
* Designers who create prototypes for the developers to implement.
* Project Architects who choose the technologies best suited to a project's requirements
* Business Analysts who write technical specifications for the developers to follow.
* Project Managers who plan development efforts.
This course is for anyone in these roles who is looking to do web development with Java and Spring.
![](https://i.imgur.com/HNplvW7.png)

How the Choice of Java and Spring Affects Members of a Development Team

# 06 When to Use Spring Boot
When is Full-Stack Development with Spring Boot Appropriate?
{%youtube _uzSCyHH42U%}
When deciding if the topics you will learn in this course are a good fit for a project you're working on, consider your environment, project features, and testing goals.

If you feel comfortable with Java and your environment supports it, it's a great language for any size project. But if you need ultra-high performance, a bare-metal language like C, C++, Rust, or Go might be a better choice.

If your project aims to connect simultaneous users on different clients, you probably need to build a server, which Spring Boot can help with. If you're making a website with dynamic data, Spring Boot provides **Thymeleaf** as an HTML template engine. If you store and manage data in a database, Spring Boot supports a plethora of Java libraries that provide database access, including **MyBatis**, which we cover in this course. As long as you need a server, Spring Boot is probably the right choice.

If you need to test your application by automating a web browser, **Selenium** is the industry standard. There are libraries for many languages to use Selenium, and Java is one of them. Selenium also has integrations with Spring Boot that make testing server behavior a breeze.

# 07 History
The History of Full-Stack Development and Spring Boot
{%youtube VJfJFGOwPxE%}
Networked computing has existed for nearly sixty years. First, specific programs were designed to speak to each other, but over the years several standards for different data protocols were established. In this era, the server/client dichotomy reigned supreme, with specialized server and client programs developed for individual network tasks like file sharing and email exchange. This changed with the development of the world wide web, HTTP, and HTML. As web sites became more complex, the web servers took on more and more roles as the mediator between the user's browser and other relevant services. This amalgamation of web server responsibilities coincided with the release and popularity of Java, which was soon accompanied by official web servlet and application container specifications which solved common problems when constructing complex, feature-rich web servers.

With the rise of the web, software developers began to meet and share ideas in open source communities online. These groups developed useful tools and utilities, including Spring, which aimed to build on Java's rich server architecture and provide a boilerplate-free enterprise development experience. It has grown into an industry standard, and an umbrella project that supports a vast array of powerful utilities and frameworks.

# 08 Coutse Outline
{%youtube 6y49Lv8u9b8%}

>The Structure of this Course and the Dependencies between Lessons
![](https://i.imgur.com/oK0mDb8.png)

**Course Outline**
* Basics of Java server architecture, dependency management in Java, and how Spring integrates with both.
* Core Spring principles. We'll be covering dependency injection, bean configuration, service development, and server-wide configuration.
* Spring MVC and Thymeleaf, an HTML template engine. We'll talk about Spring controllers, Thymeleaf template attributes, and connecting the two with the MVC pattern.
* Connecting your Spring app to a database and securing it with Spring Security. We'll cover the basics of ORM and MyBatis, an ORM tool for Java. We'll use the database to store user credentials securely and use them to authenticate users with Spring Security.
* Testing and web browser automation with Selenium. We'll cover how to set up and run tests with JUnit, how a web driver works, and how to simulate user actions in the browser with Selenium. We'll also discuss page objects, Selenium's powerful abstraction tool.

# 09 Tools, Environment & Dependencies
{%youtube RZS0KjxRcYg%}
To get the tools required for this course:

* Download the [JDK 14](https://www.oracle.com/java/technologies/javase-jdk14-downloads.html). Accept the license agreements and run the downloaded installer.
* Download the Community Edition of [IntelliJ IDEA](https://www.jetbrains.com/idea/download/). Run the downloaded installer.
* Make sure you have a modern web browser installed. We recommend [Google Chrome](https://www.google.com/chrome/).

# 10 Project: SuperDuperDrive
{%youtube cLvTm8qKeKc%}
> The End Product of the Project
![](https://i.imgur.com/ZXqF79v.png)

For the final project of the course, you're going to put all of your skills to the test to build a fully-functional web app with Spring Boot. You'll be developing a personal storage app that allows users to store files, personal notes, and website credentials securely for a new company in the cloud storage business, SuperDuperDrive. You'll have some help, in the form of a database schema and website prototype HTML files provided by your tech lead at the company. You'll be responsible for developing the registration, login, and data storage features of the application, as well as writing tests to verify the app is feature-complete.

# 11 Recap
{%youtube OLNq1QU84UE%}

>Overview of Curriculum Goals and Applications
![](https://i.imgur.com/L1d6Rjy.png)

In this course, we're going to:

* Build web apps with Java and Spring Boot.
* Learn what a Java web server is and how to build applications for it with Spring.
* Present our applications on the web with Thymeleaf and Spring MVC, and we'll connect to a database to store user data with MyBatis.
* Learn how to secure our website with Spring Security and test it with JUnit and Selenium.

Together, these skills are going to allow us to build secure, maintainable, and reliable web applications with ease. You'll be capable of taking on any web development scenario with confidence, especially one that involves registering and authenticating users, storing user-submitted data, and allowing the user to access and edit their data through a web site. Something like a file-storage app, perhaps?

# 12 Good Luck!
{%youtube 25HzguEoP5s%}