Working on a scalable custom ID generator in JPA. The format I want to achieve is:
<first three letters of country or region> + <year> + <sequence number>
For example: USA2025001
I'm currently exploring resources on custom ID generation strategies, but I’m stuck on one part:
How can I determine the client's location (country or region) at runtime so I can extract the first three letters and use it in the ID generation logic?