https://github.com/damingerdai/security-jwt-app
Spring Boot and Spring Security with JWT App
https://github.com/damingerdai/security-jwt-app
jwt-token spring spring-boot spring-security
Last synced: 2 months ago
JSON representation
Spring Boot and Spring Security with JWT App
- Host: GitHub
- URL: https://github.com/damingerdai/security-jwt-app
- Owner: damingerdai
- License: mit
- Created: 2022-06-26T13:45:10.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2026-03-26T17:48:50.000Z (3 months ago)
- Last Synced: 2026-03-27T05:26:49.844Z (3 months ago)
- Topics: jwt-token, spring, spring-boot, spring-security
- Language: Java
- Homepage:
- Size: 98.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot and Spring Security with JWT App
## database migration
update db connection in `pom.xml` with yourself db info:
```shell
mvn flyway:migrate
```
## setup
update db connection in `application.yml` with yourself db info:
```shell
mvn spring-boot:run
```
## test
### login
```shell
curl --location --request GET 'http://127.0.0.1:8080/login' \
--header 'username: admin' \
--header 'password: 12345'
```
### test api
```shell
curl --location --request GET 'http://127.0.0.1:8080/test/list' \
--header 'Authorization: Bearer ${token_from_last_step'
```
## reference
1. [Spring-security与JWT前后端分离](https://rstyro.github.io/blog/2021/07/23/Spring-security%E4%B8%8EJWT%E5%89%8D%E5%90%8E%E7%AB%AF%E5%88%86%E7%A6%BB/)
2. [秒懂SpringBoot之全网最易懂的Spring Security教程](https://shusheng007.top/2023/02/15/springsecurity/)
3. [最新版 Spring Security5.x 教程合集(顺序已经整理好)](http://www.javaboy.org/springsecurity/)