Skip to content

Lucasmellof/spring-jwt-mariadb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring + JWT + MariaDB

🌍 Click here for a Portuguese(Brazil) version.

I made this repo to study, so it should have errors or better ways to do some stuff. Feel free to open a Pull Request or create Issues.

Technologies used

How to run

  • Just compile it using: mvn clean install;
  • Copy your file from target/springus-1.0.0-SNAPSHOT.jar to a nice place;
  • Execute these queries in your database:
    INSERT INTO roles(name) VALUES('ROLE_USER');
    INSERT INTO roles(name) VALUES('ROLE_ADMIN');
    
  • And run using java (PUT YOUR ENV VARIABLES HERE) -jar springus-1.0.0-SNAPSHOT.jar.

Environment Variables

  • spring.datasource.url: Your JDBC url.
    • Ex: -Dspring.datasource.url=jdbc:mariadb://localhost:3306/springus
  • spring.datasource.username: Your database username.
    • Ex: -Dspring.datasource.username=lucasmellof
  • spring.datasource.password=supersecretpassword: Your database password.
    • Ex: -Dspring.datasource.password=super
  • springus.jwt_secret: Your JWT secret token.
    • Ex: -Dspringus.jwt_secret=supersecretjwttoken
  • springus.jwt_expiration_time: JWT token expiration time (in seconds).
    • Ex: -Dspringus.jwt_expiration_time=900000

About

⚙️Spring + JWT + MariaDB - Just for studies

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages