Java, Technology

Working with TestNG Annotations (Part1)

TestNG is a Java Framework to set up the execution flow of the code and for reporting purpose.  Annotations used in TestNG: Annotation Description @BeforeSuite BeforeSuite annotation method runs only once before all tests from the suite. @AfterSuite AfterSuite annotation method runs only once after all tests from the...

by Atul Sharma
Tag: Annotations
14-Jul-2017

Technology

Use Freedom! and Heartbeat – Be a better YouTuber!

  Starting a YouTube channel is easy but keeping it up and running is somewhat tipsy. You struggle to get enough views and subscribers in the beginning and it doesn't matter how good your content is, you rank low. This is because you still have to optimize your videos with proper tags and long but relevant description in...

by Vincent Arogya
Tag: Annotations
11-Mar-2016

Grails

Groovy Annotations for Logging

We use logging in our application to report and persist error and warning messages as well as info messages (e.g. runtime statistics) so that the messages can later be retrieved and analyzed. Initially we were getting an instance of Logger from LoggerFactory and uses it in our class for logging information, errors, exceptions, warnings...

by Neetesh Bhardwaj
Tag: Annotations
16-Dec-2014

Technology

@Canonical annotation

@Canonical: It's very useful annotation. It provides the combination of features of @ToString (default implementation of toString() method based upon the fields in the class), @EqualsAndHashCode(default implementation of equals() and hashCode() method of the class based upon the fields in the class) and @TupleConstructor (provides the...

by Mohit Garg
Tag: Annotations
27-Sep-2012

Grails

Attributes of Spring Cache

In my previous blog, i have mentioned how to integrate spring cache plugin in grails. In this blog we will see how we can use different attributes of cache. Different attributes of cache :- maxElementsInMemory- How many elements you can store in cache overflowToDisk-The attribute overflowToDisk is true, meaning that whenever the...

by Mohit Garg
Tag: Annotations
25-Sep-2012

Grails

How to integrate Spring cache plugin with Grails

In one of my recent project, i want to cache  method output. For implementing method level cache, i have used spring cache. For implement Spring cache, we can use grails cache plugin. It's very easy to integrate cache plugin with grails. 1. Add following plugin dependency in BuildConfig.groovy. [groovy]compile...

by Mohit Garg
Tag: Annotations
25-Sep-2012

Grails

Restricting Access To Plugin’s Classes With Spring Security

Many of Grails plugin like searchable  and console can prove to be really dangerous if access to their URLs is not blocked. After adding searchable plugin to my project, I realized that access to its controllers was not defined and was open for all. Now this was a major security concern. There are many ways of restricting access like...

by Hitesh Bhatia
Tag: Annotations
03-May-2012

Grails

Annotation for checking required session fields

Recently I worked on a project where I used spring security plugin. Its a very wonderful plugin for making your application secured from unauthorized users. It gives you a simple annotation @Secured to add security to your action and controller. Thats the first time I got to know the real use case of annotation. So I started reading about...

by Uday Pratap Singh
Tag: Annotations
21-Sep-2011

Grails

Grails Transactions using @Transactional annotations and Propagation.REQUIRES_NEW

Hi All, Here is how you can implement a new transaction in an already executing transaction in Grails which uses nothing but Spring framework's Transaction mechanism as an underlying implementation. Spring provides @Transactional annotations to provide declarative transactions. We can use the same in our Grails project to achieve the...

by Abhishek Tejpaul
Tag: Annotations
30-Jul-2010