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