Home » JVM Languages » Groovy

Groovy

Accurest and Stub Runner 1.1.0.M3

Currently at the Spring Team we’re polishing our libraries for the upcoming final release of the Brixton train. It should happen soon :) Until then I’m spending a lot of my after work, free time on Accurest and Stub Runner. Today’s post will be about the new stuff that you will be able to profit from in the upcoming 1.1.0 ...

Read More »

Building GORM Criteria Queries Dynamically

I originally wrote most of the queries in the spring-security-ui plugin using HQL because I find it more intuitive than criteria queries, but HQL only works with Hibernate and relational databases. A pull request updated the queries to use criteria queries to allow the plugin to be used with NoSQL datastores, but one query didn’t fit the programming style that ...

Read More »

Grails 3 DataSource Configuration

Grails 3 has new configuration files and format.  The new format is based on YAML and the file name to use for database configuration is grails-app/conf/application.yml.   I’m just getting started with Grails 3 after developing applications on Grails pre-1, 1 and 2.  I was looking forward to building a new Grails 3 application. Before I began, I read the ...

Read More »

Easy Database Manipulation with Groovy and Gradle

Groovy:  The “Enterprise Hipster” Language Not everyone sees the Java programming language as sexy.  However, the Java virtual machine is a dominant force everywhere, from the most conservative enterprise to the most whimsical startup.  There are myriad alternative languages today that compile to Java bytecode.  There are JVM-based versions of Python, Ruby, and multiple implementations of JavaScript.  There are entirely new ...

Read More »

Avoid NullPointerException: Safe Navigation with Groovy

We know it’s all too common in Java to get a NullPointerException when we use an object reference which is null. This happens when our code tries to access a method or field of an object, or element of an array when there’s no instance present – e.g. it refers to null. class Animal { String name Animal parent } ...

Read More »

Custom User types in GORM

Recently, I wanted to model a Merchant which like many things in a domain model had an Address. I thought it made sense that the Address was embedded inside the Merchant. Reasons: It had no lifecycle outside the Merchant. Merchant dies so should the address. It only ever belonged to one and only one Merchant So pretty obvious this was ...

Read More »

Making Spring Batch Groovy

spring-interview-questions-answers

Here at Keyhole, we are very fond of Spring Batch. In many Java Enterprise environments, there is still a big need for automating moving data around. Spring Batch gives us a great head start on creating these batch processes. Note: if you’re in the area on Wednesday night (8/5/15), check out Keyhole Managing Partner David Pitt’s Spring Batch presentation at the ...

Read More »

Geb Gems: Handling AJAX requests

One of the biggest struggles while testing web applications that use AJAX is dealing with the timing issues caused by asynchronous nature of the request. A common solution is using timeouts to wait for the AJAX call to be completed. This could cause lots of timing issues. Using Geb there is a better way to determine that the AJAX call and its ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns