# Snailclimb/spring-security-jwt-guide

Spring Security With JWT（含权限验证） 示例，基于 Spring Boot 3.5.0 + Java 21。

Repository: https://github.com/Snailclimb/spring-security-jwt-guide
Canonical: https://ross.abutalabs.com/products/spring-security-jwt-guide
Language: Java
License Family: other
Topics: springbooy, jpa, spring-security-jwt, spring-security, spring-security-5, register
Last push: 2025-05-26T13:54:25+00:00

## Health v2 (maintenance only)
Score: 43/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 23, release rhythm 35, longevity 100
- inputs: {"age_days": 2535, "days_push": 464, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1445, forks 436 (observed 2026-08-28T04:04:45.191967+00:00)

## What it is
A Spring Boot 3.5 + Java 21 example project demonstrating stateless authentication and role-based authorization using Spring Security and JWT, with Redis-backed token session management and JPA for persistence. It is primarily an educational guide for developers learning Spring Security.

## Use cases
- learn how to implement JWT login and logout with Spring Security
- example of role-based access control with @PreAuthorize
- see how to store and invalidate tokens in Redis
- learn JPA many-to-many mapping with a join table and auditing
- starting point for a Spring Boot auth demo with H2 in-memory database

## When to choose
- you are learning Spring Security + JWT from a working, up-to-date example
- you need a reference for token invalidation on logout/re-login using Redis
- you want a minimal runnable Spring Boot auth demo without installing MySQL

## When to avoid
- you need a production-ready, hardened authentication service
- you require a maintained library with a license and long-term support
- you use a stack outside Spring Boot/Java

## Facets
- artifact type: learning-resource
- maturity: active
- function: auth, authorization, orm, caching, api-framework
- domain: security, backend, developer-tools, tutorials, web-development
- platform: jvm, self-hosted
- tags: spring-boot, spring-security, jwt, jpa, redis, demo-project, stateless-authentication, role-based-access-control

## Member repositories
- Snailclimb/spring-security-jwt-guide (main) score 43

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:45.191967+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:12.901790+00:00, confidence not recorded.
  - readme: https://github.com/Snailclimb/spring-security-jwt-guide (fetched 2026-08-28T04:04:45.191967+00:00, sha 822451c59f48)
- Data as of 2026-08-30T08:39:29.467469+00:00.
