Consul is a service discovery and a configuration system tool used to discover the services running on multiple nodes. It is both distributed and highly available. It provides a powerful interface to get a better picture of infrastructure and services running on them. Consul gives us a variety of features that help to determine our...
Every now and then we have to bootstrap data in our application. It takes lot of time thinking what name to give, what description to add and other stuff. To overcome this, we can use faker plugin which can generate random tokens as per your need. To use this, add following in BuildConfig.groovy [java] compile...
Using Grails, we often set some application wide constants or config properties or execute certain tasks in bootstrap.groovy when the application starts . A better approach is to create a new class in src/groovy and have it implement Initialization bean interface [java] import org.springframework.beans.factory.InitializingBean ...
In our current project we are using jsecurity plugin and some of our bootstrap code required a user to be logged in. I found a nice blog http://www.tothenew.com/blog/?p=335 on this topic but it was using groovy metaprogramming to override the normal behaviour of SecurityUtils.getSubject() which is suitable for test environment. After...