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: 5 months 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 (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T14:42:57.000Z (5 months ago)
- Last Synced: 2025-01-27T15:39:27.304Z (5 months ago)
- Topics: angular, react, single-page-app, spa, spring, spring-boot, spring-mvc, vue
- Language: JavaScript
- Homepage:
- Size: 315 KB
- Stars: 3
- 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[](https://github.com/bgalek/spring-boot-starter-spa/actions/workflows/build.yml)
## 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 frontend 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