Skip to content

datenkollektiv/spring-boot-kisses-angular

 
 

Repository files navigation

Last Commit

Spring Boot kisses Angular

Update: The project has been migrated to Spring Boot 4.1.x, Java 21, and Angular 22.

Note: Parts of this project were developed and maintained with the assistance of AI tools. All generated code has been reviewed and curated by the maintainer.

Technology Stack

Component Version
Angular 22.x
Spring Boot 4.1.x
Java 21
Node.js 24.x
TypeScript 6.0.x
Build Tool Gradle 9.x

With a strong Java and Spring Framework background and looking around in the JavaScript world, it seems natural to reach out into a new technology by integrating it into a known build chain.

This repo is a companion of

Note: The Online Spring Boot Banner Generator has emerged from this template...please have a look at Create Your Own Spring Boot Banner for more details.

Quick Start

./gradlew bootRun

Then open http://localhost:8080/app/index.html in your browser.

The backend exposes a single REST endpoint, GET /server/version, which returns build metadata as { "number": "...", "buildDate": "..." } sourced from Spring Boot's BuildProperties.

Build (clean) Docker/OCI image locally

./gradlew clean -Dplatform.architecture=arm64 jibDockerBuild

Note: This command requires a Docker daemon to be present locally. For other options please refer to the Gradle plugin GoogleContainerTools/jib

export ARCH_POSTFIX=".arm64"
open http://localhost:8080/app/index.html
docker run --rm -p 8080:8080 --name spring-boot-kisses-angular datenkollektiv/spring-boot-kisses-angular:0.6.0${ARCH_POSTFIX}

Point your browser to http://localhost:8080/app/index.html and access the app version.

Maintenance

Check for npm vulnerabilities:

./gradlew npmAudit

Fix npm vulnerabilities automatically:

./gradlew npmAuditFix

Other useful Gradle tasks:

  • ./gradlew ngBuild — run the Angular production build only.
  • ./gradlew ngUpdate — update Angular packages (currently targets @22).
  • ./gradlew jibDockerBuild — build the OCI image via Google Jib (no Dockerfile required).
  • ./gradlew printVersion — print the project version (used by CI to name release artifacts).

Versioning

There are three version-like values in this project; only the first is the release version:

  • Gradle project.version (build.gradle) — the canonical release version. It drives the JAR file name, the Jib image tags, the nightly CI artifact name, and the BuildProperties shipped inside the JAR.
  • Backend GET /server/version — at runtime, the controller returns the same value (via Spring Boot's BuildProperties). This is what the Angular UI displays.
  • package.json version — pinned to 0.0.0-private. The package is "private": true and is never published; the field is kept for npm tooling and is intentionally decoupled from the release version to avoid silent drift.

About

Example app with Spring Boot and Angular

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 50.5%
  • Java 17.8%
  • Just 16.4%
  • Shell 13.6%
  • HTML 1.7%