prod-guard-oss

← Back to index

Getting Started

Start protecting your Spring Boot application in minutes


🎯 Objective

This guide walks you through the minimal steps required to:

No prior knowledge of prod-guard is required.


πŸ“‹ Prerequisites

Before starting, ensure you have:

prod-guard operates at framework level and does not require application code changes.


πŸš€ Step 1 β€” Add the dependency

Maven

Add the prod-guard starter to your pom.xml:

<dependency>
    <groupId>com.prodguard</groupId>
    <artifactId>prod-guard-starter</artifactId>
    <version>0.0.1</version>
</dependency>

Gradle implementation β€œcom.prodguard:prod-guard-starter:0.0.1”

That’s it. No additional configuration is required for the Free edition.

▢️ Step 2 β€” Start your application

Run your application normally:

mvn spring-boot:run

or

java -jar app.jar

πŸ“Š Step 3 β€” Observe the startup logs

During startup, prod-guard automatically activates.

Typical output:

[prod-guard] discovered 13 checks [prod-guard] executing 13 checks [prod-guard] WARN PG-012 - Graceful shutdown is not enabled [prod-guard] WARN PG-011 - JPA Open Session In View is enabled [prod-guard] 2 issues detected (blocking: false)

What this means

discovered: checks found on the classpath

executing: checks actually run

WARN / ERROR: production issues detected

blocking: whether startup enforcement is active

Your application continues to start normally.

🧠 Understanding check results

Each check produces:

A unique code (e.g. PG-012)

A severity (INFO, WARN, ERROR)

A human-readable explanation

A clear remediation hint

Example:

WARN PG-012 - Graceful shutdown is not enabled β†’ Set server.shutdown=graceful for production deployments

This is intentional: prod-guard is designed to be actionable, not noisy.

βš™οΈ Step 4 β€” Basic configuration (optional)

You can fine-tune prod-guard via application.yml or application.properties.

Enable / disable prod-guard prodguard: enabled: true

Report-only vs blocking mode prodguard: enforcement: report-only # default

or

prodguard: enforcement: blocking

In blocking mode, startup fails if blocking issues are detected.

πŸ”’ Step 5 β€” Understanding Premium checks

Premium checks:

Are distributed separately

Are never executed without a valid license

Remain fully offline

If Premium checks are present without a license, you will see:

[prod-guard] premium check PG-203 present but no valid license found

This is expected behavior.

πŸ‘‰ The application still starts, but Premium checks are skipped.

🧾 Step 6 β€” Enabling Premium (preview)

To enable Premium checks, you will need:

A signed prodguard.lic file

A configuration entry pointing to it

Example:

prodguard: license: path: ./prodguard.lic

Once a valid license is detected:

[prod-guard] premium license validated for Vicente_Lopez [prod-guard] executing 22 checks

➑ Full details are covered in the Licensing Guide.

πŸ§ͺ Step 7 β€” Typical first fixes

New users usually fix:

Graceful shutdown

HTTP timeouts

JPA Open Session In View

Connection pool sizing

prod-guard then becomes a regression guard: if a bad configuration is reintroduced, startup warns or blocks immediately.

βœ… What you have now

At this point, you have:

Integrated prod-guard

Seen production issues detected automatically

Understood the execution model

Prepared for Premium activation

All without modifying application code.

Next Steps

← Back to index