Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgalek/spring-boot-starter-spa
Zero configuration single page app configuration for spring boot
https://github.com/bgalek/spring-boot-starter-spa
angular react single-page-app spa spring spring-boot spring-mvc vue
Last synced: about 1 month ago
JSON representation
Zero configuration single page app configuration for spring boot
- Host: GitHub
- URL: https://github.com/bgalek/spring-boot-starter-spa
- Owner: bgalek
- License: apache-2.0
- Created: 2020-06-22T21:03:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-02T15:04:40.000Z (about 4 years ago)
- Last Synced: 2024-10-01T15:30:59.897Z (about 2 months ago)
- Topics: angular, react, single-page-app, spa, spring, spring-boot, spring-mvc, vue
- Language: JavaScript
- Homepage:
- Size: 250 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot Starter - Single Page App
> Zero configuration single page app configuration for spring boot![Build](https://github.com/bgalek/spring-boot-starter-spa/workflows/Java%20CI%20with%20Gradle/badge.svg)
![Maven Central](https://img.shields.io/maven-central/v/com.github.bgalek.spring.boot/spring-boot-starter-spa)## Why?
Single Page Apps require one thing: return index.html on HTML request.Sometimes it's wise to separate your apps (api backend & frontend backend + frontend) - but then you'll have to deal with versioning both aps in compatible way.
For simple use cases it's totally ok to have spring-boot serve your SPA application (build i.e. by webpack).
Spring-boot does not support this feature out of the box. I've found multiple workarounds (404 page filters, manual file checking etc.)
and decided to make no-brainer library to handle this problem.## Usage
Add library dependency:
```groovy
compile "com.github.bgalek.spring.boot:spring-boot-starter-spa:1.1.0"
```Copy your fontend application to `/public` or `/static` folder during your app build phase.
## Compatibility
This configuration won't affect your:
- API calls (registered Controllers)
- Existing static files