This post demonstrates how to temporarily configure Groovy to run on Windows. This is useful when we are unable to add or modify environment variables in Windows due to restrictions.
Kotlin – Compile and Run from Windows Command Line
This post demonstrates how to compile and run Kotlin from Windows Command Line. For Unix/Linux, it should be quite similar.
Kotlin – How to use your Kotlin library in Java Maven projects
This post demonstrates how to use a Maven dependency written in Kotlin in a Java Maven project.
JPA – How to use @Embeddable and @Embedded
In Java Persistence API (JPA), a class can either be an @Entity or a value type. If a class is an @Entity, it is a persistent class. It represents a database table (or set of tables). If a class is a value type, it is not a persistent class. It may not represent a database table or a set of database tables. It may be used as a reusable component whose properties are used across multiple tables.
JPA – Optimistic Lock with @Version
In JPA, the use of @Version allows us to use Optimistic Locking wherein no real locks are actually applied to the database when updating records.
Kotlin – Singleton
This post demonstrates how to create a Singleton object in Kotlin.
Kotlin – Read file line by line from Classpath
This post shows how to leverage Java libraries (from our underlying JVM) to read file line by line from classpath using Kotlin. Also, IntelliJ IDE is used for this post but can easily be replicated in Eclipse.
Maven – Create an executable jar
This post demonstrates how to create an executable in Apache Maven using maven-shade-plugin plugin.
Mock methods that return void
Previously, I posted Void methods and Mockito in Java that verifies if any of the methods of a object passed as a argument were invoked. This time we want to alter the behavior of a method that returns void.
Render XML using Thymeleaf
This post demonstrates how to render an XML to a file from a given XML template using Spring Boot and Thymeleaf.