A Secondary Facebook Login with Spring Social 1. Overview In this tutorial, we’ll focus on adding a new Facebook login to an existing form-login app. We’re going to be using the Spring Social support to interact with Facebook and keep things clean and simple. 2. Maven Configuration First, we will… Continue Reading facebook-authentication-with-spring-security-and-social

Spring Data MongoDB – Indexes, Annotations and Converters 1. Overview This tutorial will explore some of the core features of Spring Data MongoDB – indexing, common annotations and converters. 2. Indexes ==== 2.1. @Indexed This annotation marks the field as indexed in MongoDB: @QueryEntity @Document public class User { @Indexed… Continue Reading spring-data-mongodb-index-annotations-converter

Download an Image or a File with Spring MVC Spring MVC 1. Overview Serving static files to the client can be done in a variety of ways, and using a Spring Controller isn’t necessarily the best available option. However, sometimes the controller route is necessary – and that’s what we’re… Continue Reading spring-controller-return-image-file

REST Query Language with Spring Data JPA and Querydsl 1. Overview In this tutorial, we’re looking at building a query language for a REST API using Spring Data JPA and Querydsl. In the first two articles of this series, we built the same search/filtering functionality using JPA Criteria and Spring… Continue Reading rest-api-search-language-spring-data-querydsl

Find the Longest Substring without Repeating Characters 1. Overview In this tutorial, compare ways to find the longest substring of unique letters using Java. For example, the longest substring of unique letters in “CODINGISAWESOME” is “NGISAWE”. 2. Brute Force Approach Let’s start with a naive approach. To begin with, we can examine… Continue Reading java-longest-substring-without-repeated-characters