
Meet John Thompson, a veteran Java and Spring Framework expert. He shares practical Spring tips, common pitfalls, and how to get direct help through course messaging and email.
Master Thymeleaf as a natural Java templating language within Spring Boot, turning plain HTML with Bootstrap into Thymeleaf templates and applying Spring Security for login-based content.
Initialize a new Spring Boot project with Spring Initializr, learn to check out a GitHub repository, and set up an ontology project to drive the rest of the course.
Create a new spring boot project with spring initializer in IntelliJ, selecting maven, web, and thymeleaf. Understand how Spring Boot configures thymeleaf on the classpath and manages dependencies.
Check out a GitHub project in IntelliJ, clone via the repo URL, open it as a Maven project, and configure the Java SDK.
Explore the basics of html and Bootstrap with John Thompson. See how Bootstrap speeds up building a polished demo website within a Spring Framework project.
Create an html document in the templates directory and convert it into a Thymeleaf template. Structure head and body, include css and javascript imports, and preview updates in the browser.
Explore adding CDN resources for Bootstrap CSS in a Thymeleaf and Spring Boot setup, loading Bootstrap from a CDN for local files and from the Spring app in production.
Explore the bootstrap grid system for page layout, using container, row, and 12-column divisions; learn nesting rows and columns, gutters, and responsive behavior across devices.
Explore bootstrap's grid system by creating a new row with headings, then offset a column by three in a 12-column grid, and style its background, this is my offset grid.
Review the Bootstrap code assignment by building a row with headings, offsetting a three-column div by three, applying a background color, and testing the page in the browser.
Explore building a mock e-commerce site in pure HTML using Bootstrap CSS framework, preserving Thymeleaf's natural template language, then converting to Thymeleaf templates rendered by Spring MVC in Tomcat.
Build the main index page using Bootstrap grid to display a three-across course catalog, and convert this pure HTML into Thymeleaf templates with dynamic content supplied by Spring MVC.
Create a dynamic course product page with a buy now button using Thymeleaf and Spring Boot, linking from the index, and preparing for content loaded by Spring MVC.
Review a bootstrap-based product page for master Thymeleaf with Spring Boot, detailing jumbotron, product image, tax updates, and a buy now button, plus linked index and cart and login forms.
Set up Spring MVC to render Thymeleaf templates, add a Thymeleaf namespace for valid documents, and render static CSS and JavaScript resources through the Thymeleaf engine on Tomcat.
Configure Spring MVC by creating two controllers and URL mappings to Thymeleaf templates. Use Spring Boot defaults to manage Thymeleaf configuration while wiring controllers and templates.
Convert email documents to thymeleaf templates by enforcing a well-formed XML structure and adding the thymeleaf html namespace, then fix unclosed image tags and missing mappings before rebuilding.
Explore the Thymeleaf standard dialect and xml namespace, and how Thymeleaf templates define valid commands. The browser ignores Thymeleaf attributes while the engine renders content at runtime.
Explore rendering static resources with Thymeleaf in a Spring Boot app by using Thymeleaf tags to replace and serve Bootstrap, jQuery, and CSS through Spring MVC, enabling dynamic asset management.
Explore a hands-on assignment that uses Thymeleaf to replace external image sources with local static resources. Update six image tags to load from the images folder in the project.
Review how to replace image URLs with Thymeleaf image tags in a Spring Boot app, loading images from the static resources folder and making templates self-contained via file-system paths.
Externalize properties into the application properties file and configure Thymeleaf to read them, then explore internationalization to support multiple languages with language-specific strings.
Learn to externalize text in Thymeleaf with Spring MVC by using a messages.properties file and Thymeleaf text tag to substitute dynamic values like page titles.
Configure spring mvc internationalization with a locale resolver and locale change interceptor; set up message bundles for German, English, Spanish, French, Polish, and Russian via locale parameter.
Implement internationalization in a Spring Boot Thymeleaf app by externalizing the jumbotron heading and buy now button text, adding locale-specific properties, and previewing language changes in the browser.
Review how to implement i18n with Spring Boot by adding locale-specific properties for the jumbotron tagline and buy now button, with fallbacks.
Learn to use Thymeleaf fragments to reuse headers, footers, and other common components across templates, and implement a jumbotron fragment and a code assignment for a common footer.
Learn to create and reuse thymeleaf fragments by placing fully qualified HTML fragments in a fragments directory, naming a jumbotron fragment, and including it with th:replace in templates.
Implement Thymeleaf fragments by creating a jumbotron for the product page and a reusable footer fragment, and include them on both the index and product pages.
Review a thymeleaf fragments coding assignment by integrating a reusable footer fragment across index and product pages, using thymeleaf templates, fragments, and messages.
Learn to speed up spring boot dev tools development with class reloading and browser live reload, using a maven pom dependency and IDE considerations.
Master how Spring MVC retrieves a data object from a service layer, injects it into the controller, and renders dynamic content in a Thymeleaf view via the model.
Build a spring mvc service layer that returns pre-populated product objects with authors and categories for dynamic thymeleaf rendering, using a map-backed repository and dependency injection.
Configure a Spring MVC controller to fetch a product by id from the product service, bind it to the model as product, and return it to the Thymeleaf template.
Learn to render dynamic objects in Thymeleaf templates by accessing backend models with dollar-sign expressions, using dot notation to reach product properties and bind to the model in Spring Boot.
Modify Thymeleaf templates to update index links to include product ids and access nested properties using dot notation to display the author's first and last name and price.
Learn to apply Thymeleaf conditional logic in Spring Boot, displaying the product price when greater than zero and showing 'free' when zero, with inline expressions and currency formatting.
Explore rendering lists of objects in thymeleaf with Spring Boot, iterating through products with th:each, and using reusable thymeleaf fragments to build a product catalog grid.
The index controller uses the product service to obtain a list of products and binds it to the model as 'products' for Thymeleaf to render on the index page.
Mastering Thymeleaf with Spring Boot teaches how to iterate over a product list with th:each, rendering a dynamic table row for each item and its properties.
Mastering Thymeleaf with Spring Boot teaches you to use iteration with fragments to display a list of products by passing each product to a Thymeleaf fragment for a grid view.
Master Thymeleaf iteration to render product page categories, hide the existing markup, and display Cat one, Cat two, Cat three using Bootstrap breadcrumb styling in a clean Thymeleaf template.
Review the Thymeleaf iteration over product categories on the product page, using Bootstrap breadcrumbs and an unordered list to render one list item per category.
Explore Thymeleaf expressions in Spring Boot, including message, variable, and selection expressions, with examples on text operations, concatenation, and conditional logic.
Explore the integration of thymeleaf with Spring MVC by setting up a command object, adding validations, binding a form, triggering errors, and configuring Thymeleaf to display validation messages to users.
Set up a Spring MVC configuration with a checkout command object and validation, bind form inputs via a controller, and render Thymeleaf templates for checkout form and checkout complete.
Set up the Thymeleaf checkout form in Spring Boot, bind an empty checkout command to the model, test MVC mappings, and prepare for Bootstrap-based validation messages.
Learn to display a bootstrap alert box for form errors with Thymeleaf and Spring MVC validation, using binding result and a message bundle.
Explore field level validation with Thymeleaf and Bootstrap in a Spring Boot app. Display inline errors, highlight invalid fields, and render internationalized error messages via the messages bundle.
Complete the remaining form properties, implement field level validation with thymeleaf expressions, and populate the messages bundle; optionally explore locale switching for internationalized messages with Spring i18n.
Explore Thymeleaf form validation by reviewing a Spring Boot checkout form, detailing message properties, validation messages, and Bootstrap styling for errors using Thymeleaf expressions.
Create a login form with thymeleaf and bootstrap in spring boot, featuring username and password fields with validations and a command object. Build a controller to test it from scratch.
John Thompson guides a code review of a login form, creating a login command object with not empty validation, a Thymeleaf template, URL mappings, and messages properties.
Discover Thymeleaf and Spring Security integration, build a basic login form, and use Thymeleaf extensions and the Thymeleaf dialog to show content based on login status.
Explore how to configure spring security with maven by using spring boot starter dependencies, inheriting versions from the parent pom, and avoiding conflicts through curated spring boot releases.
Configure spring security with spring boot defaults, override settings, and define admin and user accounts to test thymeleaf integration, showing role-based access and login/logout flows.
add the thymeleaf spring security extension as a separate maven dependency, since it's not included in the baseline jar, update the pom.xml, and prepare for spring security integration with thymeleaf.
Learn to enable spring security tags in thymeleaf by adding the spring security dialect xml namespace, and create a demo page that shows content based on login status and roles.
Learn to show content based on login status using the timely spring security extension and isAuthenticated, distinguishing authentication from authorization in a Thymeleaf and Spring Boot app.
Discover how to show content based on user roles in thymeleaf with spring security, using has role checks for admin and user, and handle common pitfalls like quote types.
Access the username from the Spring Security user details object via the principal and display it on the web page, with an eye toward personalized content.
Discover how the thymeleaf time-life tag library mirrors the spring security jsp tag library, enabling access to authentication details and roles for dynamic content.
Thymeleaf is a highly popular templating engine to use with Spring MVC to produce rich, and dynamic web pages.
Unlike other options available for Java and Spring Boot, Thymeleaf has a natural templating language - meaning you can view the templates right in your favorite browser. This really helps accelerate your development process.
Try doing that with JSP!
In this course you are guided step by step in building an ecommerce like web application using Thymeleaf, Spring MVC, and Spring Boot.
The focus of the course is on building web content with Thymeleaf. You start off the course building web pages using Bootstrap CSS. These are simple web pages you can view right in your browser. (No Spring Boot or Spring MVC - yet!) This is to give you a good overview of Bootstrap CSS, one of the most popular CSS frameworks in use today!
Next, you build the HTML for a product catalog website. Just the HTML to show a product listing and product detail pages.
Then we take your HTML pages and convert them into Thymeleaf templates. We add the templates into a Spring Boot application. Spring Boot will auto-configure Spring MVC to render the Thymeleaf templates under Tomcat.
You get to see how we transition the HTML documents from simple HTML, into Thymeleaf Templates for the Spring Boot application.
Using Spring MVC, you are able to start introducing dynamic content into the Thymeleaf templates.
From here you get to explore using Thymeleaf with Spring Boot.
You get hands on examples of:
Externalizing Text properties
Using Spring MVC Internationalization with Thymeleaf
Using Thymeleaf Fragments for common page components.
Leveraging Spring Boot Developer tools to speed up your development
Rendering POJOs returned from Spring MVC under Thymeleaf
Looping over lists in Thymeleaf
Using Thymeleaf fragments with lists
Thymeleaf expression syntax
Spring MVC validation with Thymeleaf
Using Spring Security with Thymeleaf
How to show different content to logged in users vs anonymous users
While the course does use the Spring Framework, Spring Boot, Spring MVC, and Spring Security - these are not the primary topics of the course.
If you are a Spring Framework developer, used to JSPs (Java Server Pages) and wishing to get up to speed on Thymeleaf this is a perfect course for you! You'll never want to use JSPs again!
Even if you are not a Spring Framework developer, you will still get a lot out of this course! Thymeleaf is a powerful templating technology for Java and Spring. With Spring Boot it becomes very easy to develop rich dynamic content!