A Java Geek weekly 60

Your own custom Spring Data repository

Functional Programming is becoming more and more popular. Spring provides a couple of DSLs for the Kotlin language. For example, the Beans DSL and the Routes DSL allow for a more functional approach toward Spring configuration. On the type side, Vavr (previously Javaslang) is pretty popular in Java, while Kotlin has Arrow.

In this post, I’d like to describe how one can use Arrow’s type system with Spring Data. Ultimately, you can benefit from the explanations to craft your custom Spring Data repository.

Product update: Liquibase now collects anonymous usage analytics

I understand the idea of telemetry for product managers. So far, so good.

Yet, as user gandy, it’s not anonymous at all:

LicenseService licenseService = Scope.getCurrentScope().getSingleton(LicenseServiceFactory.class).getLicenseService();
String userId = ExceptionUtil.doSilently(() -> {
    String issuedTo = licenseService.getLicenseInfoObject().getIssuedTo();
    // Append the end of the license key to the license issued to name. Some customers have multiple keys
    // associated to them (with the same name) and we need to tell them apart.
    if (StringUtils.isNotEmpty(issuedTo)) {
        issuedTo += "-" + StringUtils.right(licenseService.getLicenseKey().getValue(), AnalyticsArgs.LICENSE_KEY_CHARS.getCurrentValue());
    }
    return issuedTo;
});
AtomicBoolean timedOut = new AtomicBoolean(true);
Translating code quality into business impact

Negotiating with people who decide how budget is spent is never a fun part of a developer’s life. What if you could speak in a language they can understand?

Logging Best Practices: 12 Dos and Don’ts

Happy to have shared some of these advices in the past.

What’s so bad about sidecars, anyway?

Balanced analysis of sidecars' pros and cons. The conclusion mentions eBPF of course.

Multi-Tenancy Kubernetes in 2024

We believe that multi-tenancy in Kubernetes is a solution to many existing challenges and allows you to use Kubernetes to its full potential. It significantly reduces the amount of wasted resources and brings down costs considerably. Whether you aim to save costs or build an internal developer platform, multi-tenancy is the right approach — though it can be challenging to implement. Solutions such as vCluster help address these challenges by offering a control plane per tenant, rather than a cluster per tenant.

Hidden Security Features of the JVM - Everything You Didn’t Know and More
Language attrition

Language attrition is the process of decreasing proficiency in or losing a language. For first or native language attrition, this process is generally caused by both isolation from speakers of the first language ("L1") and the acquisition and use of a second language ("L2"), which interferes with the correct production and comprehension of the first.

The Copenhagen Book

The Copenhagen Book provides a general guideline on implementing auth in web applications. It is free, open-source, and community-maintained. It may be opinionated or incomplete at times but we hope this fills a certain void in online resources.

Hashcode and Equals Debugging, Performance

Going down the rabbit hole of core methods that are inherent in Java but common in many languages

Notice of breaking changes for GitHub Actions

If you’re using GitHub Actions, that’s definitely a must read!

The "Just Sharing" Principle

"Here’s what worked for us in our context, but I recognize that your context is different"

Whereas some folks share their experiences as a recommendation, some of us find it more effective to share our experiences anecdotally.

Nicolas Fränkel

Nicolas Fränkel

Developer Advocate with 15+ years experience consulting for many different customers, in a wide range of contexts (such as telecoms, banking, insurances, large retail and public sector). Usually working on Java/Java EE and Spring technologies, but with focused interests like Rich Internet Applications, Testing, CI/CD and DevOps. Also double as a trainer and triples as a book author.

Read More
A Java Geek weekly 60
Share this