DEV Community

Cover image for πŸš€ Starting Spring by Example V2: Completing Module 01 -Spring Security
Mujuzi Moses ο£Ώ
Mujuzi Moses ο£Ώ

Posted on

πŸš€ Starting Spring by Example V2: Completing Module 01 -Spring Security

When I started learning Spring, I noticed that many tutorials showed how to use Spring features, but didn't always explain how the different pieces fit together.

I learn best by building and documenting what I discover, so I started Spring by Example.

The idea is simple: build small, focused examples that explore specific Spring concepts through code, tests, and documentation.

After completing the first version of the project, I decided to start a new chapter: Spring by Example V2.

Why V2?

V2 keeps the same philosophy but expands the scope.

The goal is to explore the modern Spring ecosystem through small but extensive examples, covering areas such as:

  • Spring Security
  • Spring Data
  • Reactive Spring
  • Spring Modulith
  • Spring Testing
  • Capstone Application
  • Spring Batch
  • Spring Integration
  • Spring Cloud
  • Spring AI
  • GraalVM Native
  • Kotlin

Small examples. Extensive coverage.

And I'm happy to say that Module 01 - Spring Security is now complete! πŸŽ‰

Module 01 - Spring Security

The module contains focused examples covering:

  • Basic Spring Security
  • SecurityFilterChain
  • Authentication
  • UserDetailsService
  • Password Encoding
  • Authorization
  • SecurityContext
  • Method Security
  • CSRF Protection
  • Session Management
  • OAuth2 Login
  • JWT Authentication
  • Spring Security Testing

One of the biggest things I wanted to understand was how these pieces fit together.

A simplified view looks like:

HTTP Request
     ↓
Security Filter Chain
     ↓
Authentication
     ↓
Authorization
     ↓
SecurityContext
     ↓
Application
Enter fullscreen mode Exit fullscreen mode

The goal wasn’t simply to memorize Spring Security annotations.

It was to understand what each component does, where it fits, and how the pieces work together.

That’s the approach I want to continue throughout V2.

What’s Next?

With Spring Security complete, Module 02 - Spring Data is next.

I’ll be exploring repositories, entity mapping, queries, pagination, specifications, auditing, projections, transactions, and custom repository implementations.

The project is open source:

πŸ”— GitHub: https://gith.ub/dsAQrAU5

πŸ”— GitLab: https://gitl.ab/gfDEyGH3

One focused example at a time. πŸš€

If you’ve worked with Spring Security before, what part helped you understand it better?

java #spring #springframework #springboot #springsecurity #opensource #github #learninginpublic #backend #softwareengineering #programming

Top comments (0)