Back to Blog
Sanitizer-Lib is Now Live on Maven Central
Java Libraries

Sanitizer-Lib is Now Live on Maven Central

Great news for Java developers! Sanitizer-Lib, the library that eliminates input sanitization boilerplate, is now officially available on Maven Central. Here is how to add it to your project.

December 9, 20252 min readRabi
javamaven-centralopen-sourceclean-codeannouncement

It’s official: Sanitizer-Lib is now available on Maven Central! 🚀

A few months ago, I introduced Sanitizer-Lib, a Java library designed to kill the boilerplate of input sanitization. No more manual .trim() calls, no more scattered string manipulation logic. Just clean, declarative annotations.

Since then, the feedback has been amazing. But there was one friction point: you had to use JitPack or build it locally.

Not anymore.

As of today, you can pull Sanitizer-Lib directly from Maven Central. It’s production-ready, signed, and just a copy-paste away.

📦 How to Install

Maven

Add this to your pom.xml:

<dependency>
    <groupId>io.github.rabinarayanpatra.sanitizer</groupId>
    <artifactId>sanitizer-spring</artifactId>
    <version>1.0.22</version>
</dependency>

Gradle

Add this to your build.gradle:

implementation("io.github.rabinarayanpatra:sanitizer-spring:1.0.22")

✨ Why You Should Use It

If you missed the original deep dive, here is the 30-second pitch:

Instead of writing this validation spaghetti:

public void createUser(UserDto user) {
    if (user.getEmail() != null) {
        user.setEmail(user.getEmail().trim().toLowerCase());
    }
    // ... repeat for 10 other fields
}

You just do this:

public class UserDto {
    @Sanitize(using = {TrimSanitizer.class, LowerCaseSanitizer.class})
    private String email;
}

That’s it. Incoming requests are automatically sanitized before they even hit your controller logic.

📚 Learn More

For a full walkthrough of features, custom sanitizers, and Spring Boot integration, check out my detailed guide:

👉 Read the Full Sanitizer-Lib Introduction

Or star the repo on GitHub: github.com/rabinarayanpatra/sanitizer-lib

Happy coding! ☕

Join the Community

Get the latest articles on system design, frontend & backend development, and emerging tech trends delivered straight to your inbox.

No spam. Unsubscribe at any time.

Liked the blog?

Share it with your friends and help them learn something new!