From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Add a home page - Spring Tutorial
From the course: Complete Guide to Spring MVC
Add a home page
- [Instructor] Our next step is that we're going to add a homepage, and this is because we want to add a index.html. And the reason why we're going to do that is because when you add in an index.html page, Spring Boot automatically serves this as your welcome page so that you can access the root URL of your application just by going to local host 8080. And with that, we're going to go into our static folder here. Go ahead and right click, go to New, HTML file, and we're going to name it the name we just said, which is index.html. Okay, and we're going to navigate here. So within title, let's go ahead and title this Getting Started; Serving Web Content. Also, for those of you who are newer to static content, static content refers to files like HTML, CSS, JavaScript, and images that are served directly to the client without any server side processing. Spring Boot provides a convenient way to serve static content from your application, which is why we are adding this here. There we go…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What you will build and what you need2m 50s
-
Start from scratch vs. skipping the basics1m 41s
-
(Locked)
Starting with Spring Initializr4m 49s
-
(Locked)
Skip basics: Source repository for this guide1m 46s
-
(Locked)
Create a web controller9m 13s
-
(Locked)
Spring Boot devtools4m 45s
-
(Locked)
Run the application2m 38s
-
(Locked)
Test the application2m 7s
-
(Locked)
Add a home page5m 11s
-
(Locked)
Summary and next steps4m 57s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-