Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danilomurer/spring-boilerplate
Spring Boilerplate Code with Role Based JWT Authentication and User and Role Entity
https://github.com/danilomurer/spring-boilerplate
Last synced: 4 days ago
JSON representation
Spring Boilerplate Code with Role Based JWT Authentication and User and Role Entity
- Host: GitHub
- URL: https://github.com/danilomurer/spring-boilerplate
- Owner: DaniloMurer
- License: mit
- Created: 2020-09-16T14:39:19.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T09:57:25.000Z (almost 3 years ago)
- Last Synced: 2024-10-11T15:45:14.826Z (28 days ago)
- Language: Java
- Size: 106 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring RESTApi Boilerplate Code
## Description
This repository contains a Maven Project with a Spring REST API which has a role based JWT authentication.
The project uses a H2 database with the Spring Data JPA Dependency. The project also has two Roles automatically created:
- USER
- ADMINISTRATOR## How to use
To get started you have to clone the repository from GitHub. Then you need to run `mvn install`.
After that you can adjust the package names to your needs.
Mapped Requests:
- POST /user/signup - Add new User to the database
- POST /login - Get JWT Token from Backend## Run as Docker container
First make sure to install docker and docker-compose on the respective OS you're using.
The second step is to build the jar file, this can be done using following command:
```bash
mvn clean install
```Then you can build and run the container:
```bash
sudo docker-compose up --build
```
## ImportantThis repository and the code is licensed under the MIT License, thus means you need to mention that the code is from us.