Basic Spring Security configuration with in-memory users

Опубликовано: 17 Июль 2026
на канале: Gabriel Chaldu
614
54

In this video, we take our first steps with Spring Security in a REST API, building a basic configuration from scratch to secure routes, establish basic HTTP authentication, and understand key concepts such as filters, security beans, and password encoding.

1:46 Explaining the project structure.
3:54 Enabling the Spring Security dependency.
4:42 Creating the configuration file and the SecurityFilterChain bean.
8:28 Creating the UserDetailsService.
12:39 Encrypting the password.
12:44 Explaining CSRF
16:08 What is a Bean?

We learn how to:

Create users in memory with UserDetailsService

Configure HttpSecurity with .httpBasic()

Understand what CSRF is and when to disable it

Use BCryptPasswordEncoder to encrypt passwords

This is the ideal starting point if you're just getting started with Spring security and want to truly understand what each piece of code does, without blindly copying configurations.

Java: Explore the Language from Scratch discount coupon: https://cursos.devtalles.com/courses/...
DevTalles: https://cursos.devtalles.com/
First 3 sections FREE:    • Curso: Java - Explora el lenguaje desde ce...