Swagger Request Validator with Grails 3.2.x

Ever heard the phrase “Never Trust User Inputs”? This is one of the most important things a developer has to keep in mind while writing code. We have all been through the tedious task of validating request before starting to process it. If that’s not tedious enough, we also have to add test cases to verify that the validations indeed are working properly.

Wouldn’t it be great if all that extra work can be avoided just by using an open source Java library which does that for us!

Recently, we decided to use Swagger Request Validator that validates the Http request/response against an OpenAPI specification. The idea was to integrate this library with Grails framework. In this article, we will see how to achieve this without breaking a sweat.

(more…)

Using Inline Plugins in Grails 3

In Grails 2.x, it was possible to specify inline plugins in BuildConfig.groovy but in Grails 3 this has been changed. As Grails 3.x uses Gradle as it’s build tool, we need to define inline plugins as a sub-module in our main app.  (more…)

All you need to know about our hiring process – INFOGRAPHIC

–  (more…)

Bit Implementation using Enum (Java and Groovy)

The assumption here is that you have basic knowledge of Enums. Also, I will be writing all Groovy code here, you can simply convert it to Java using Java’s syntax.  (more…)

ElasticSearch With Grails and Mongo

Setting Up ElasticSearch and Best Practices:

Let’s talk about elastic search based upon Lucene. There’s already wealth of information about elastic search in various blogs but when I was trying to incorporate it into our Grails + Mongo application, I’d to navigate through uncharted territory. Since, I care so much about you guys, I don’t want you to wander into that dark path. So, here’s all you need to know.   (more…)

Mongeez Migration Gotchas

Mongeez is a MongoDB migration management library which allows to manage the changes in the documents & records of MongoDB.  (more…)

Grails + Spring Security Core + Tomcat SSL + Nginx

To host any Grails based web application, Apache Tomcat is a common choice. However serving some static files like image, js & css files through Tomcat is waste of resources & CPU cycles.

A quite simple solution to overcome this problem is to install & configure Nginx in front of Tomcat. Nginx is a free, open-source, high-performance HTTP server and provides reverse proxy. Nginx is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.  (more…)

Post dependency injection in Grails Services

Problem Statement:

There are scenarios when we need to use default singleton feature of Grails services to hold some data by reading from configuration.  (more…)

Groovy DSL dbmigrations using Liquidbase documentation

If you need a finer level of control with dbmigrations, you can create your own groovy dsl change sets using liquibase documentation. Below are some examples:  (more…)

Custom Groovy Changes In Grails DbMigration (Part II)

In my previous post for Custom Groovy Changes In Grails DbMigration, you have seen various example to write custom changes for your migrations. Here are some more more cases with example:  (more…)

STAY UPDATED!

Do you want to get articles like these in your inbox?

Email *

Interested groups *
Healthtech
Business
Technical articles

Archives