https://github.com/asepscareer/spring-boot-jwt
Spring Boot JWT
https://github.com/asepscareer/spring-boot-jwt
spring-boot spring-security spring-security-jwt
Last synced: about 1 year ago
JSON representation
Spring Boot JWT
- Host: GitHub
- URL: https://github.com/asepscareer/spring-boot-jwt
- Owner: asepscareer
- Created: 2022-10-06T10:07:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-05T07:35:30.000Z (almost 3 years ago)
- Last Synced: 2025-01-25T17:11:26.628Z (over 1 year ago)
- Topics: spring-boot, spring-security, spring-security-jwt
- Language: Java
- Homepage: https://jwt-asep-5fcb7418385e.herokuapp.com/swagger-ui
- Size: 81.4 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot with JWT and H2 example
---
## Dependency
– If you want to use PostgreSQL:
```xml
org.postgresql
postgresql
runtime
```
– or MySQL:
```xml
mysql
mysql-connector-java
runtime
```
## Configure Spring Datasource, JPA, App properties
Open `src/main/resources/application.properties`
- For PostgreSQL:
```
spring.datasource.url= jdbc:postgresql://localhost:5432/testdb
spring.datasource.username= postgres
spring.datasource.password= 123
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation= true
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto= update
# App Properties
storm.app.jwtCookieName= stormcode
storm.app.jwtSecret= stormCodeSecretKey
storm.app.jwtExpirationMs= 86400000
```
- For MySQL
```
spring.datasource.url= jdbc:mysql://localhost:3306/testdb?useSSL=false
spring.datasource.username= root
spring.datasource.password= 123456
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto= update
# App Properties
storm.app.jwtCookieName= stormcode
storm.app.jwtSecret= stormCodeSecretKey
storm.app.jwtExpirationMs= 86400000
```
## Run Spring Boot application
```
mvn spring-boot:run
```