https://github.com/daggerok/spring-boot-nextjs-spa
Example of using Next.js as static site generator to be served with Spring Boot Web Thymeleaf
https://github.com/daggerok/spring-boot-nextjs-spa
frontend-maven-plugin github-actions java java-18 maven maven-frontend-plugin netty netty-all next nextjs nextjs-example nextjs-export npm npx spring-boot spring-boot-2 spring-mvc spring-thymeleaf spring-webflux thymeleaf
Last synced: 8 months ago
JSON representation
Example of using Next.js as static site generator to be served with Spring Boot Web Thymeleaf
- Host: GitHub
- URL: https://github.com/daggerok/spring-boot-nextjs-spa
- Owner: daggerok
- Created: 2022-04-04T22:33:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-04T22:48:11.000Z (over 3 years ago)
- Last Synced: 2025-04-05T10:23:04.775Z (9 months ago)
- Topics: frontend-maven-plugin, github-actions, java, java-18, maven, maven-frontend-plugin, netty, netty-all, next, nextjs, nextjs-example, nextjs-export, npm, npx, spring-boot, spring-boot-2, spring-mvc, spring-thymeleaf, spring-webflux, thymeleaf
- Language: Kotlin
- Homepage:
- Size: 107 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot and Next.js [](https://github.com/daggerok/spring-boot-nextjs-spa/actions/workflows/tests.yml)
Example of using Next.js as static site generator to be served with Spring Boot Web Thymeleaf
## Backend development
```bash
./mvnw clean compile spring-boot:run
```
## Frontend development
```bash
./mvnw frontend:install-node-and-npm frontend:npm@npm-run-dev -Pdev
```
## Serve static frontend
```bash
./mvnw clean frontend:install-node-and-npm frontend:npm@npm-run-export frontend:npx@npx-serve-out -Pserve
```
## Test, build and run app
```bash
./mvnw ; java -jar target/*.jar
open http://127.0.0.1:8080
```
## RTFM
* https://github.com/netty/netty/issues/11020
* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.6.6/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.6.6/maven-plugin/reference/html/#build-image)
* [Coroutines section of the Spring Framework Documentation](https://docs.spring.io/spring/docs/5.3.18/spring-framework-reference/languages.html#coroutines)
* [Spring Configuration Processor](https://docs.spring.io/spring-boot/docs/2.6.6/reference/htmlsingle/#configuration-metadata-annotation-processor)
* [Spring Reactive Web](https://docs.spring.io/spring-boot/docs/2.6.6/reference/htmlsingle/#web.reactive)
* [Building a Reactive RESTful Web Service](https://spring.io/guides/gs/reactive-rest-service/)