
Gotcha: Segfault when HTTP headers include newlines with Go
Why you may be receiving a segfault when using http.Client with HTTTP headers that include newlines.
28 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Gotcha: Segfault when HTTP headers include newlines with Go
Why you may be receiving a segfault when using http.Client with HTTTP headers that include newlines.
28 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Converting Spring Boot Property Variables to Environment Variables with Go
A command-line script to convert a Spring Boot property to an environment variable.
26 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Pretty Printing JSON Web Tokens (JWTs) on the Command Line using Go
How to easily introspect and pretty print a signed JWT (JWS) or an encrypted JWT (JWE) on the command line using Go.
26 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Gotcha: Field casing is important when marshalling structs to JSON in Go
Why you may be missing fields from your structs in your Go json.Marshal calls.
25 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Testing @Scheduled annotations with Spring (Boot)
How to test your Spring (Boot) scheduling without waiting for hours.
25 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Creating a "Manual of Me"
Creating a reference document about how to best collaborate together.
23 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Pretty Printing JSON on the Command Line with Go
Using Go's JSON module to pretty print JSON objects from the command line.
21 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Reading all of stdin on the command-line with Go
How to read the whole of stdin, up to EOF, with Go.
21 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Exporting a Git repo as an archive
How to export a Git repo as an archive format, such as a .tar.gz or a .zip.
18 February 2022 · 1m
www.jvt.me • by Jamie Tanna
How to interpolate a property inside Spring Security @PreAuthorize / @PostAuthorize
How to use the value of a property in a Spring Security authorization statement.
17 February 2022 · 3m
www.jvt.me • by Jamie Tanna
ffmpeg on the command-line
How to use ffmpeg to combine two MP4 files, where each file contains audio and video separately.
17 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Adding a Wiretap to a Spring WebFlux WebClient to Log All Request/Response Data
How to log all request/response data from a Spring Webflux WebClient.
13 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Determining if the Spring Boot Application is Running in Debug or Trace Mode
How to determine if your Spring Boot application is running in debug mode, for instance to selectively enable other features of your application.
13 February 2022 · 3m
www.jvt.me • by Jamie Tanna
Simplifying Spring (Boot) ExceptionHandlers by extending ResponseStatusException
How to drive HTTP response status codes from exceptions by extending Spring's ResponseStatusException.
12 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Bundling Multi-File OpenAPI Documents into a Single File
Looking at the options we have for converting a multi-file OpenAPI specification to a single document.
10 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Announcing openapi.tanna.dev, a client-side OpenAPI Viewer
Creating a hosted version of a local and client-side only OpenAPI viewer.
8 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Generating Favicons using ImageMagick on the Command-Line
How to generate a multi-size favicon.ico on the command-line using ImageMagick.
7 February 2022 · 1m
www.jvt.me • by Jamie Tanna

Excluding Filters When using WebMvcTest
How to exclude specific Filters from running when performing WebMvcTests.
7 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Capturing HTTP Requests with okhttp's MockWebServer.takeRequest
How to use MockWebServer's takeRequest method to verify that HTTP request(s) are sent correctly.
7 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Integration Testing Your Spring WebClients with okhttp's MockWebServer
How to write integration tests using MockWebServer with Spring Boot, for use with WebClients.
7 February 2022 · 5m
www.jvt.me • by Jamie Tanna
Generate Plain Old Java Objects (POJOs) from OpenAPI Model Definitions with Gradle
How to generate POJOs really quickly and easily, with no manual work, using the Gradle openapi-generator Plugin.
5 February 2022 · 2m
www.jvt.me • by Jamie Tanna
Running Elements API Viewer to Verify Local OpenAPI/Swagger Documents
How to run Elements UI locally to visualise OpenAPI documents.
3 February 2022 · 2m
www.jvt.me • by Jamie Tanna

Validating a MockMvc Response Has No Content Type
How to validate, in a MockMvc test, whether the response has no content-type nor a body.
2 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Replacing Text in Vim with the Output of a Command
How to replace text under the cursor with the output of a command.
1 February 2022 · 1m
www.jvt.me • by Jamie Tanna
Integration Testing Your Spring RestTemplates with RestClientTest, using spring-test
How to write integration tests using RestClientTest with Spring Boot, for use with RestTemplate and RestTemplateBuilders.
1 February 2022 · 8m
www.jvt.me • by Jamie Tanna
Running Swagger UI to Verify Local OpenAPI/Swagger Documents
How to run Swagger UI locally to visualise OpenAPI documents.
31 January 2022 · 2m
www.jvt.me • by Jamie Tanna

Announcing spring-content-negotiator, a Java Library for Content Negotiation with Spring
Releasing a new library that can support content negotiation in Spring (Boot) applications, i.e. in Filters or ExceptionHandlers.
30 January 2022 · 1m
www.jvt.me • by Jamie Tanna
Getting Started with jMolecules and the (Classical) Onion Architecture, with a Spring Boot project
A guided example of converting a Spring Boot project to the Onion Architecture pattern.
28 January 2022 · 6m
www.jvt.me • by Jamie Tanna
How to Create and Unit Test Java Bean Validation Annotations
A guided example through what the different type of annotation ElementTypes are, with respect to Bean Validation, and how to write unit tests for them.
23 January 2022 · 12m
www.jvt.me • by Jamie Tanna
Codifying Your Technical / Architectural Standards with ArchUnit
How to use ArchUnit to codify your technical standards to reduce code review requirements, and arrive at a more consistent codebase.
21 January 2022 · 7m
www.jvt.me • by Jamie Tanna
Appending to a Querystring using Go
How to append query parameters in a URL in Go.
20 January 2022 · 1m
www.jvt.me • by Jamie Tanna

Simplifying Spring (Boot) ExceptionHandlers with ResponseStatus Annotations
How to use annotations to drive HTTP response codes from a Spring ExceptionHandler.
20 January 2022 · 2m
www.jvt.me • by Jamie Tanna
Use SLF4J, not Log4J, as Your Logging Interface
Why we should be using the interface API for logging, rather than the underlying implementation's API.
20 January 2022 · 3m
www.jvt.me • by Jamie Tanna
Using the Facade Pattern to More Easily Test static or Complex Classes
How to use the Facade design pattern to more easily test classes that are more complex than our tests need to understand.
19 January 2022 · 2m
www.jvt.me • by Jamie Tanna
Mocking void methods with Mockito
How to Mock a void method with Mockito, for instance to throw an exception.
18 January 2022 · 1m
www.jvt.me • by Jamie Tanna

Content Negotiation with Servlet Filter in Spring (Boot)
How to perform content-negotiation in a Servlet Filter, to serve the correct representation of error to a consumer, based on the Accept header.
18 January 2022 · 3m
www.jvt.me • by Jamie Tanna
Content Negotiation with ControllerAdvice and ExceptionHandlers in Spring (Boot)
How to perform content-negotiation in a Spring ExceptionHandler, to serve the correct representation of error to a consumer, based on the Accept header.
18 January 2022 · 5m
www.jvt.me • by Jamie Tanna
Error Handling in (Spring) Servlet Filters
How to return HTTP errors when a Java Servlet fails with Spring (Boot).
17 January 2022 · 2m
www.jvt.me • by Jamie Tanna

Announcing uuid, a Java Library for UUID Validation
Releasing a new library that can be used to validate UUIDs in Java.
14 January 2022 · 1m
www.jvt.me • by Jamie Tanna
Validating UUIDs with Regular Expressions in Java
How to validate UUIDs and UUIDv4s in Java with a regex.
14 January 2022 · 1m
www.jvt.me • by Jamie Tanna
Auditing with Spring Boot Actuator
How to use Spring Boot Actuator for your audit and business event logging needs.
13 January 2022 · 9m
www.jvt.me • by Jamie Tanna
Returning a Value, or a Default, From a Java Optional
How to replace imperative code with a functional style, when returning a default value for a Java Optional.
13 January 2022 · 1m
www.jvt.me • by Jamie Tanna

Adding both an ObjectMapper and a YAMLMapper to Spring Boot
How to have an ObjectMapper and a YAMLMapper coexisting in a Spring Boot project's bean dependencies.
10 January 2022 · 2m
www.jvt.me • by Jamie TannaEvery post, by when it was posted. The brighter a month, the more was posted that month.