Spring and JPA: use custom value types inside entities with a custom converter

If you want secure code, or code with fewer bugs, you want to track the kind of data you’re passing around. In your code, do not pass around strings or any other built-in built-in primitive type. Those are for the edges: we have to accept strings as input, we have to write VARCHAR to the … Read moreSpring and JPA: use custom value types inside entities with a custom converter

I turned on Spring Security and my POSTs don’t work anymore

^ that’s what I googled, so that’s the title of the blog post that solves it. When I added spring-boot-starter-security to my dependencies, I expected my whole app to suddenly be behind a login screen. But I expected it to work after logging in. Instead, it failed at the first form submission. And it failed … Read moreI turned on Spring Security and my POSTs don’t work anymore

Dependency Injection vs Functional

At work, we use dependency injection to build up small, decoupled classes each with a single responsibility. DI lets us assemble these in multiple different ways, so we can use the same class for similar processes. This strategy of combining small pieces of functionality in different ways is also a goal of functional programming. Let’s … Read moreDependency Injection vs Functional