-
Elevate Your Web Content: Adding Image Support with Spring Boot, Thymeleaf, and CKEditor
Introduction In this guide, we will walk you through the process of integrating image support into your online text editor using a stack that includes Spring Boot, Thymeleaf, and CKEditor. Whether you’re building a wiki, a recipe site, or any application where visual content matters, this tutorial will help you take the next step in…
-
Send an email with Spring Boot and Thymeleaf
Using Spring Boot and Thymeleaf, it’s easy to send HTML emails to your users. This post will show the configuration and logic to send an email. We won’t go into details on how to setup the template, that’s for another time. Project setup Assuming you already use Spring Boot, we need to add two dependencies…
-
Spring Boot – Load users from database
This is the third article in a series on authentication with Spring Boot. In the first article we authenticated using social networks, and allowed any user to access our application. In the second article we used inMemoryAuthentication for users that used the login form. In essence, we hardcoded our users. This article is about adding…
-
Spring Boot login with a form
Previously I wrote about securing your application with social login. But not everybody has a social account. In this article we’re going to add formlogin to the application. Formlogin simply means that your users can log in with a username and password. We’re going to keep it as simple as possible, with in-memory authentication. Adding…
-
Spring Boot and Oauth2 with Thymeleaf
Spring has a good tutorial explaining how to authenticate with your application using one or more external authentication providers, like GitHub or Google. This tutorial uses a single page application with a Rest endpoint. For a personal project I didn’t want a single page application, I wanted to use Thymeleaf. During implementation I discovered a…
-
Linux: Spring Boot as a service on port 80
Well, that’s a mouth full. This blog shows how to run your Spring Boot application on port 80 when your linux server starts. We are going to use Ubuntu or Linux Mint for this, and we’re going to assume that Java is installed. Setup Spring Boot The first thing we need to do is tell…
-
Spring Boot, MongoDB and raw JSON
Sometimes you want to store and retrieve raw JSON in MongoDB. With Spring Boot storing the JSON isn’t very hard, but retrieving can be a bit more challenging. Setting up To start using MongoDB from Spring Boot, you add the dependency to spring-boot-starter-data-mongodb And then you inject MongoTemplate into your class Inserting into MongoDB Inserting…