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

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…

Contents