Jump Into Grails 2.0

Do you hate reading? Well today is your lucky day because instead of reading a post, you can watch my first ever Grails screen-cast! It’s definitely a little rough around the edges though and you’ll have to watch it full-screen otherwise the text will be too small.

The topic is “Jumping into Grails 2.0″ using the spring-security-core and resources plugins as well as some unit testing. Please let me know in the comments if you find the screen-cast valuable or not.

30 comments on this post.
  1. Jens:

    Great intro to version 2. Thanks.

  2. Domingo:

    Great – I’ve learnt a few things from your screencast. Thanks.

  3. Michael:

    Very cool – thanks for the effort! I’ve also learned a lot. Could I submit a wish for an ACL tutorial? Thanks – Michael

  4. bronoman:

    Thank you very much. Awesome work! Your intro to spring security convinced me to persue this avenue in my grails project.

  5. Juha Vainikka:

    Good stuff! Keep ‘em coming Bobby.

  6. Ray Tayek:

    any chance of posting the code. i have poor vision.


  7. John Wagenleitner:

    Great screencast, very informative and nicely paced. If not already in the works, would be great to have it linked to from the Grails screencasts page at http://grails.org/Grails+Screencasts.

  8. An Army of Solipsists » Blog Archive » This Week in Grails (2012-01):

    [...] Bobby Warner’s published a great screencast this week on using Grails 2.0 and Spring Security – Jump Into Grails 2.0 [...]

  9. » Blog Archive:

    [...] Bobby Warner ha pubblicato uno splendido screencast questa settimana su come usare Grails 2.0 e Spring Security – Jump Into Grails 2.0 [...]

  10. bobby:

    @Michael, Sure, I can look into doing an ACL screencast at some point in the future.

  11. bobby:

    @Ray, Sure, I can put the code on GitHub if you’d like. I’ll update the post with the GitHub repo URL when I have it up there.

  12. bobby:

    @John, I tried to put in on the grails.org screencast past, but ran into an issue with the form. I posted to the Grails mailing list and hopefully I’ll be able to put them up there soon. Thanks!

  13. GroovyMag - the magazine for Groovy and Grails developers about Groovy programming and Grails development:

    [...] Jump Into Grails 2.0 [...]

  14. Mahboob:

    Hi Bobby,

    Many thanks for your great posts on this site.

    Where I really need help is -
    I want to add User Registration and Forgot Password functionality to my login module. I have followed your previous screencast and built the login functionality using grails spring-security-core.

    The grails spring-security-ui didn’t work for me. With grails 2.0 spring-security-ui does not render the login button, and with grails 1.3.7, it renders an extra button. I don’t want to go back to grails 1.3.7 just to make spring-security-ui work and then land up with a shabby extra button.

    So, what would work for me is to just pull out the “User Registration” and “Forgot Password” functionality out of spring-security-ui and latch it to my project. As a starter, if you could provide what files I need, it will be very helpful. Probably you could do a screen cast on this issue.

    I’m thinking that there will be many people in my situation. For all of us, what I am requesting you will be a work around until a bug-free, robust spring-security-ui plugin is released.

    – MH

  15. bobby:

    @Mahboob I’ll think about possibly doing an additional screencast on security in the future as there was a request for the ACL plugin too.

    Specifically for your question about spring-security-ui, you will want to look at this code: https://github.com/grails-plugins/grails-spring-security-ui/blob/master/grails-app/controllers/grails/plugins/springsecurity/ui/RegisterController.groovy

  16. bobby:

    @John, All my screencasts are now up on grails.org. There also is going to be an update to the site to fix the error I was facing.

  17. Mahboob:

    Hi Bobby,

    I took the RegisterController.groovy as per your suggestion, and noted the dependent files as:

    I created the correct directory structure in my project as per the package declarations, and saved the files in those directories.

    grails throws the following error:
    No signature of method: groovy.util.ConfigObject.contains() is applicable for argument types: (java.lang.String) values: [$]
    Possible solutions: containsKey(java.lang.Object), containsKey(java.lang.Object), toString(), toString(), toString(), toString(). Stacktrace follows:
    Message: No signature of method: groovy.util.ConfigObject.contains() is applicable for argument types: (java.lang.String) values: [$]
    Possible solutions: containsKey(java.lang.Object), containsKey(java.lang.Object), toString(), toString(), toString(), toString()
    Line | Method
    ->> 138 | doCall in grails.plugins.springsecurity.ui.RegisterController$_closure4

    Line 138 of RegisterController.groovy is an if condition:

    def conf = SpringSecurityUtils.securityConfig
    def body = conf.ui.forgotPassword.emailBody
    if (body.contains(‘$’)) {

    How do I fix this error?

    – MH

  18. bobby:

    @Mahboob, Please ask this specific code issue on the Grails user list as it’s outside the scope of this screencast. Thanks!

  19. Steve:

    This was fantastic… I wish it had been around a month ago when I started into spring security and grails for the first time with no idea what I was doing, and some vague pointers from people who’d used Grails 1.3. Thanks heaps

  20. batman:

    great article – thanks bobby. i’m just starting out with grails, and this is an excellent resource for me.

    btw – did you ever get around to posting the source code?

  21. bobby:

    @batman, thanks for the feedback. Glad you liked it. I forgot to post the code, but I’m planning an extension screen-cast to add more security features and I’ll make sure I post the code for that one (which will also have everything from this one).

  22. bobby:

    You can get the code here: https://github.com/gr8casts/episode-001

  23. olivier nguyen:

    Hi, I see you are using a TextEditor. Can you debug a Grails app with Textmate or SublimeText 2?

    Is working with a text editor and the command line the most popular way to develop an app with Grails 2?

  24. bobby:

    @Olivier I like using just a text editor and command line, but I would say it’s probably more common to use an IDE like SpringSource Tool Suite (based on Eclipse) or IntelliJ IDEA.

  25. Chris:

    Is there anything special that needs to be done to get the modules in ApplicationResources to render in Internet Explorer? Page loads with Invalid character errors…

  26. bobby:

    @Chris No, there shouldn’t be anything special needed for IE. I have not run into any issues specific to IE before. If you seeing weird errors, please post on Mailing List so we can help get them resolved! Thanks.

  27. Bryn:

    Great screencast Bobby. Really clear and nicely paced.

  28. Shantanu:

    I’m using Grails 2.0.4 and the command ‘grails’ is not recognised in terminal in the directory you specified… is there any solution or am I doing it wrong?

  29. Shantanu:

    ps: I’m using mac osx

  30. Alan:

    That is nice material. Good hands on with Spring Security.

Leave a comment