It is time to learn something new. Yes, I want to learn application development and that does not mean that I have to learn all UI technologies. All I want to learn is Business Application development which will be valid for the business forever and doesn’t fade with UI technologies inventions.

I have decided to give following a try

  1. Eclipse Scout
  2. Grails

Eclipse Scout exactly says that it is for business application development. But my biggest problem is setting up eclipse to start with Contact applications that they provide as Sample. It takes lot of time for me to get started and hence I parked it temporarily

Grails is another framework which I (only) believe that it will help me learn faster. I liked the command line version of commands to create application, controllers, etc. On top of that, it has lot of things built using Spring (at least sounds like to me…). I always go jealousy to see those Spring developers :).

Well, it all started and I had my very basic application app and running with in 5 minutes using grails framework. I’m able to login to the simple application following some presentation in slideshare 

Here comes the interesting part, Now I would like to add some color to the simple application login flow where I would like to add LDAP(AD) support. When I searched over internet for sample application I could not find any simple and straightforward samples. However I understood that there are some spring plugin to be added into the application such as spring-security-core plugin for grails.

When I searched over internet on how to add this plugin into my application I could not get direct answer. With lot of googling around, I figured out following steps. You can check all the plugins available for Grails here,

Step -1: Open your build.gradle (Yes, Grails is using Gradle !!) and add following to specify the dependencies. Before adding this, you should make sure you visit the plugin site and get the latest version. When I write this, the version for spring-security-core is 3.2.1

dependencies {
compile "org.grails.plugins:spring-security-core:3.2.1"

Step -2: Now, actually there is no step – 2 (Would you believe it?)

All you have to do is run the application. Upon successful, you should see grials automatically downloading the dependencies for you before bringing up the application


d:\simple-login>grails run-app

| Resolving Dependencies. Please wait...


| Running application...

Configuring Spring Security Core ...
... finished configuring Spring Security Core

Grails application running at http://localhost:8080 in environment: development

This new security core plugin is adding some additional commands in the grails which is something like below,

d:\>grails help

s2-create-persistent-token Creates a persistent token domain class for the Spring Security Core plugin
s2-create-role-hierarchy-entry Creates a domain class for a persistent role hierarchy for the Spring Security Core plugin
s2-quickstart Creates domain classes and updates config settings for the Spring Security plugin

I yet to explore this stuff further as I’m in a hurry to figure out good editor for Grails project. In my all exploration I found that Eclipse is not working out so far. Note, I’m using Grails 3x version and GGTS  is not supporting as it could not even recognize my simple Grails project 🙂

Leave a Reply

Your email address will not be published.

WP2Social Auto Publish Powered By :