Alright, so here’s what this is. This little Spring Boot project lets you scan a message and mask out any sensitive or blacklisted words you don’t want floating around in plain text.
There’s also full CRUD support, so you can add, update, or delete those sensitive words whenever you feel like the list needs tweaking.
Swagger is set up too, so you can poke around the endpoints without needing to guess what's what.
In short:
- Takes in a message and replaces sensitive words with asterisks
- Stores those sensitive words in a real MSSQL database
- Gives you endpoints to manage that list (create, read, update, delete)
- Comes with a working Swagger UI so you can see and test the endpoints
Also yeah, there’s a Dockerfile in here that spins up an MSSQL instance locally on port 1433. It’ll load up a bit of starter data too, so you're not starting from zero.
-
Make sure Docker is running on your machine.
-
Spin up the MSSQL container (see the Docker bits in the repo).
-
Update
application.propertiesto match the container’s DB config. It's probably already good to go unless you've changed ports or credentials. -
Run the app with:
./mvnw spring-boot:run
-
Visit http://localhost:8080/swagger-ui.html for the docs and a handy way to test stuff.
Here’s what you can hit:
-
POST /api/message/mask → Give it a message, get a masked one back
-
GET /api/sensitive-words → Get all sensitive words
-
POST /api/sensitive-words → Add a new word
-
PUT /api/sensitive-words/{id} → Update a word by ID
-
DELETE /api/sensitive-words/{id} → Delete a word by ID