Spock integration testing without redirected view

Today I am going to explain some basic concept of Spock integration testing without redirected view. Here I am going to check returning model from action and how to test action when it is returning model? class CreateAppController { def addDetail() { def playList = []...

Starting with Mongodb

– Mongodb is basically a database system that is document oriented and Nosql type. -Typically we call a table as a collection and a record as a document as oppose to tables and rows in RDBMS. -One of its advantage is that it does not restrict a us to a structure...

Installing and Configuring MongoDB

MongoDB is a NoSQL database that is cross platform and is a document-based system. It can be easily installed in an Ubuntu server from the command-line. In Ubuntu 12.04 LTS repositories it’s current version is 2.0.4. To install it in Debian / Ubuntu, open up a...

Working with MongoDB using Java

Hello guys, This is my first post on this blog. In this post i am going to explain how to interact with MongoDB using Java.First we need to install MongoDB using apt-get command in Ubuntu. Once we have installed MongoDB, we need a MongoDB jar file(Driver) which we...

Show JSON request data in Grails action

Problem : At the time of Stripe Webhook URL integration with my grails application, I was getting an empty request in webhook URL and it confused me a lot. Finally i found out that Stripe sends response back to webhook URL in JSON format. I was not able to print the...

Working mechanism of Grails pagination

I am trying to explain the simple mechanism used in grails pagination . For this I have created brand new application which uses the grails default pagination and column sorting.In my grails-app I just used a domain class as follows: class Book { String title String...

Install ftp server on local Linux machine

In this blog post, I am going to discuss that how ftp server is install and configured on local machine. Firstly install the Ftp server on local machine. I am using Ubuntu 12.04. To install ftp server on ubuntu machine: sudo apt-get install vsftpd 1 sudo apt-get...

Mapping components in Hibernate using XML

In persistent units we often face a scenario where we think of grouping few similar properties and creating separate persistent entity for them would be expensive. For such situation creating embedded components for grouping such properties makes more sense. The life...

MongoDB for MySQL Developers : Part 1

MongoDB for MySQL/RDBMS Developers : Part 1 This is my for first post for “Mongodb for Mysql developers series”. I come from RDBMS background and these were things which were new to me: MySQL - MongoDB "Database" - "Database"...

Create simple JPA application.

We’ll be using maven for dependency management and H2 database. Let’s start by adding all the dependencies to the pom.xml. <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId>...

Grails SpringSecurity Session testing

Today I am going to explain Grails springSecurity Session testing. Let us make a controller and action that is mentioned below. Here I have made a controller named as UserController and a check action that will check for user authentication and I have made the domain...

Grails performance monitoring using newrelic

In this post i am going to talk about how we started monitoring the performance of our grails application. We have a big release coming up in couple of months and development on the product was going on from last 10 months. In one of our reviews last month we started...