Jackson JSON Views 1. Overview In this tutorial, we’ll go over how to use Jackson JSON Views to serialize/deserialize objects, customize the views and finally – how to start integrating with Spring. 2. Serialize Using JSON Views First – let’s go through a simple example – serialize an object with… Continue Reading jackson-json-view-annotation

Java Weekly, Issue 280 Here we go… 1. Spring and Java ===== >> Multiple Cache Configurations with Caffeine and Spring Boot [techblog.bozho.net] A novel extension of the CaffeineCacheManager lets you configure caches with different specs, all managed by the same CacheManager. Very cool. >> Running Kotlin Tests With Gradle [petrikainulainen.net]… Continue Reading java-weekly-280

Command-Line Arguments in Java 1. Introduction It’s quite common to run applications from the command-line using arguments. Especially on the server-side. Usually, we don’t want the application to do the same thing on every run: we want to configure it’s behavior some way. In this short tutorial, we’ll explore how… Continue Reading java-command-line-arguments

How to Change the Default Port in Spring Boot 1. Introduction Spring Boot provides sensible defaults for many configuration properties. Still, we sometimes need to customize these with our case-specific values. A common use case is changing the default port for the embedded server. In this quick tutorial, we’ll cover… Continue Reading spring-boot-change-port

Java – Byte Array to Writer 1. Overview In this very quick tutorial, we’ll discuss how to convert byte[] to Writer using plain Java, Guava and Commons IO. 2. With Plain Java Let’s start with a simple Java solution: @Test public void givenPlainJava_whenConvertingByteArrayIntoWriter_thenCorrect() throws IOException { byte[] initialArray = “With… Continue Reading java-convert-byte-array-to-writer