_blogs
// blogs / 20260628.md
// blogs / 20260628.md
Dev Log: June 28 Wrap-up
Overview
Today was one of those 'infrastructure and polish' days. I spent most of my time wrestling with deployment configs and finally bumped the project over to Java 21. It's a lot of 'plumbing' work, but the dev experience feels way smoother now.
What I Worked On
The Java 21 Migration
It was time. I updated the pom.xml and the Dockerfile to use Java 21 (Temurin). I also had to pin Lombok to a newer version to make sure the annotation processor didn't freak out with the new bytecode. It’s a small change, but keeping the tech stack current is one of those things you thank yourself for six months later.
Wrangling Render & JDBC
I hit a classic snag while setting up the production environment on Render. Render provides a connectionString property for databases, but it uses the postgres:// protocol. Spring's JDBC driver is picky and wants jdbc:postgresql://.
Instead of writing a custom parser, I just broke the environment variables down into individual components. It's more verbose in the yaml, but it's much more reliable. I also realized that using an auto-generated string for the JWT_SECRET was a bad move. The security library I'm using expects a specific bit-length and Base64 encoding, so I switched that to a manual sync.
# Snippet of the fix in the deployment config
- key: PGHOST
fromDatabase:
name: ecommerce-db
property: host
- key: APP_JWT_SECRET
sync: false # Set manually to ensure proper Base64 encoding
Automation & Architecture Docs
I got tired of manually running SQL queries every time I needed to test a new tenant, so I whipped up a Python helper script to handle the bootstrapping. It prompts for the store details and handles the DB connection—way faster than copy-pasting UUIDs into a terminal.
I also finally sat down and wrote the ARCHITECTURE.md. I documented how we're handling the dual-store persistence (Postgres for relational data and MongoDB for the more flexible bits) and how the multi-tenancy filter actually works. It's one of those things that lives in your head until you suddenly realize no one else on the team can read your mind.
Testing Improvements
Lastly, I enabled an H2 profile for integration tests. Previously, the tests were trying to lean on a dev database, which is just asking for flaky builds. Now, it spins up an in-memory instance, runs the migrations via Flyway, and tears it all down. Clean and fast.
Wrapping Up
Everything is finally deploying correctly and the docs are in a good place. Tomorrow, I'm planning to dive back into the core logic—specifically refining how we handle row-level security for different tenants. Catch you then.