Skip to content

Spring Boot Starter Env Printer – v1.0.0

Choose a tag to compare

@Skywalker690 Skywalker690 released this 02 Dec 22:25
· 13 commits to master since this release

🚀 Spring Boot Starter Env Printer — v1.0.0

This is the first public release of the Spring Boot Starter Env Printer, a lightweight and highly configurable Spring Boot starter built to simplify environment debugging across development, staging, and production environments.

The starter automatically prints relevant environment variables at startup, supports a project-only scanning mode, filters noisy OS variables, and exposes data via simple HTTP endpoints — all with zero configuration.


✨ Features Included in v1.0.0

✔ Automatic Environment Variable Printing

Prints clean, readable SLF4J logs of environment variables when the application starts.

✔ Actuator-Independent REST Endpoint

Access environment variables without needing Spring Boot Actuator:

GET /env/env-printer

✔ Optional Actuator Endpoint

If Actuator is present, the starter exposes:

GET /actuator/envprinter

✔ Project-Only Mode (Smart Scanning)

Shows only environment variables actually referenced in your project:

  • ${ENV_VAR} placeholders in .properties and .yml

  • @Value("${ENV_VAR}") annotations

  • System.getenv("VAR") usage

  • Default placeholders ${VAR:default}

✔ OS-Specific Variable Filtering

Automatically excludes 50+ noisy OS environment variables to keep output clean.

Windows:
APPDATA, TEMP, TMP, SystemRoot, HOMEPATH, ProgramFiles, ...

Linux/Unix:
DISPLAY, XDG_*, SHELL, TERM, LANG, LC_*, ...


⚙️ Configuration Properties

Property Default Description
env.printer.enabled true Master switch for the entire starter
env.printer.endpoint-enabled true Enable/disable HTTP endpoints
env.printer.project-only true Scan project and show only referenced env variables
env.printer.show-values false Show real values instead of masking (use carefully)

Supports both .properties and .yml.


🌐 Endpoints

1. REST Controller (No Actuator Required)

GET /env/env-printer

2. Actuator Endpoint

GET /actuator/envprinter

Both return a JSON map of filtered environment variables.


📦 Maven Dependency

<dependency>
    <groupId>io.github.skywalker690</groupId>
    <artifactId>spring-boot-starter-env-printer</artifactId>
    <version>1.0.0</version>
</dependency>

🛠 Requirements

  • Java 17+

  • Spring Boot 3.2.4+

  • Spring Web (for REST endpoint)

  • Actuator (optional)


🔒 Security Note

Showing real environment variables can expose sensitive information.

Recommended:

env.printer.show-values=false

Disable in production entirely:

env.printer.enabled=false

📚 Documentation

Full documentation is available here:
https://github.com/Skywalker690/spring-boot-starter-env-printer/tree/main/docs


🗺 Roadmap (v1.1.0)

  • Improved secret masking rules

  • Prefix-based filtering

  • Additional masking strategies

  • IDE autocompletion via metadata (spring-configuration-metadata.json)

  • More efficient project scanning

  • Additional endpoint formats


👤 Author

Sanjo (Skywalker690)
https://github.com/Skywalker690

If you find this starter useful, please ⭐ star the repository!