Spring Boot Web Application, Study Guides, Projects, Research of Computer science

A complete introduction to Spring Boot Web Application

Typology: Study Guides, Projects, Research

2018/2019

Uploaded on 11/27/2019

grusso74
grusso74 🇮🇹

8 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5

Partial preview of the text

Download Spring Boot Web Application and more Study Guides, Projects, Research Computer science in PDF only on Docsity!

Standard June 25,2015 by|t 40 Comments In the first part of this tutorial series for building a web application using Spring Boot, we looked at creating our Spring project using the Spring Initializr. This handy tool gave us a Spring project to work with, jump starting our development effort by creating the project structure and Maven dependencies for us. In this post | am going to walk you through enabling rendering a webpage using Thymeleaf and Spring MVC. Why Thymeleaf? Traditionally, Spring MVC applications used Java Server Pages, or JSPs to generate html content. JSPs are a mature technology and has been around since the early days of Java. In terms of raw speed, JSPs are hard to beat too. But when you do not need the absolute raw speed of a JSP, you may want to consider alternatives to JSPs which help improve developer productivity. JSPs offer an HTML ‘like’ syntax. Meaning its close, but not completely compatible with HTML. Thymeleaf on the other hand, aims to be a “Natural Template”. This means the Thymeleaf template file will open and display normally in a browser, while a JSP file does not. | also have selfish reasons for using Thymeleaf in this tutorial on Spring Boot. I've never used it, and | thought it looked like a cool technology to try out. Spring Intro Course Thymeleaf Configuration and Spring Boot If you were using just Spring MVC, you would need to configure the Thymeleaf template engine for use. That's not so when you're using Spring Boot, because we've included the dependency spring-boot-starter- thymeLeaf in our Maven POM for the project, so Spring Boot will do some things automatically for us_ By default, Spring Boot configures the Thymeleaf template engine to read template files from /resources “templates - Effectively, you as the developer just need to start making Thymeleaf templates and dropping them into /resources/tempLates _