https://github.com/7mza/spring-webpack-template
another minimalistic spring thymeleaf webpack template
https://github.com/7mza/spring-webpack-template
spring-boot thymeleaf typescript webpack
Last synced: 3 months ago
JSON representation
another minimalistic spring thymeleaf webpack template
- Host: GitHub
- URL: https://github.com/7mza/spring-webpack-template
- Owner: 7mza
- Created: 2025-03-04T17:18:45.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-04T05:27:17.000Z (11 months ago)
- Last Synced: 2025-08-04T08:29:20.395Z (11 months ago)
- Topics: spring-boot, thymeleaf, typescript, webpack
- Language: Kotlin
- Homepage:
- Size: 605 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# spring + webpack template
minimalistic spring thymeleaf webpack template
webpack
* ts to js
* minification
* lint/format
* chunking
* tree shaking
* build cache
* cache busting
spring
* nonce filter
gradle
* gradle npm caching
haproxy
* self-signed https cert
* http to https redirect
* basic CSP
## reqs
[jdk 24](https://sdkman.io)
```shell
sdk env install
```
[node lts](https://github.com/nvm-sh/nvm)
```shell
nvm install
```
[docker](https://docs.docker.com/desktop)
## generate self signed tls
```shell
# apt install openssl
cd ./keystore/
chmod +x ./gen_cert.sh
./gen_cert.sh
```
## build
```shell
npm i
```
webpack production mode
```shell
npm run build && ./gradlew clean ktlintFormat ktlintCheck build
```
webpack development mode
```shell
npm run build:dev && ./gradlew clean ktlintFormat ktlintCheck build -Pmode=development
```
if gradle-node-plugin is giving errors
```shell
./gradlew --stop
```
## run
```shell
./gradlew bootRun
```
[http://localhost:8080](http://localhost:8080)
or with docker
```shell
docker compose up --build
```
[https://localhost](https://localhost)