Skip to content
프로젝트

hantsy/spring-webmvc-jwt-sample

GitHub에서 보기

소개

Spring Security와 JWT 토큰 기반 인증으로 REST API를 보호합니다.

보안 및 개인정보 보호

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

spring-webmvc-jwt-sample

build

What is this?

This is a sample project that demonstrates how to use JWT token-based authentication to protect RESTful APIs in a Spring Web MVC application.

[!note] If you are interested in the new variant built with the Spring WebFlux stack, check spring-reactive-jwt-sample for more details.

Guide

Please refer to the step-by-step guide for a detailed explanation of the example codes.

The original code was written in Spring Boot 2.0. There are some slight differences in the main/master branch due to the changes introduced in the latest Spring Boot 3.x.

Prerequisites

Please ensure that you have installed the following software.

  • Java 21
  • Apache Maven 3.9.x/4.0.0+
  • Docker

Build

Clone the source code from GitHub.

git clone https://github.com/hantsy/spring-webmvc-jwt-sample

Open a terminal, switch to the project's root folder, and run the following command to build the entire project.

docker compose up postgres // start up a postgres
mvn clean install // build the project

Please proceed with executing the following command to run the application.

mvn spring-boot: run
// or from the command line after building
java -jar target/xxx.jar

Contribution

Any suggestions are welcome, filing an issue or submitting a PR is also highly recommended.

관련 프로젝트 살펴보기

불러오는 중…