This is template for spring-react application with authorization by Json Web Token (JWT). When I was learning authorization in SPA it was difficult to find any working example. So I created my own. This is simple project with authorization, home page and logout.
If you find something that can be improved, please, open an issue, so I can fix it.
Or you can fix it on your own and suggest a pull request to me.
Thank you, in advance.
For this project you need to install npm and jdk. Dont forget to setup system variables.
git clone https://github.com/dmitryblackwell/spring-react-template.git
cd spring-react-template
mvnw spring-boot:run -P prod
-P prod
means that app is going to run under prod maven profile with maven frontend.
This plugin automatically install node_modules and create bundle.js for website.
If you want to run it for development purposes than you need to import it your IDE and run
- SpringReactTemplateApplication for spring web api.
- Webpack dev server for automatic rendering your fronted part -
npm start
.
Backend:
- Spring Boot
- Spring Data
- Spring Security
- Hibernate ORM
Frontend:
- React
- React Hooks
- Webpack