2012
01.05

Jump Into Grails 2.0

Category: Web Development / Tag: grails / Add Comment

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.

20 comments so far

Add Your Comment
  1. spacer
    Jens said: 2012.01.06 00:33

    Great intro to version 2. Thanks.

  2. spacer
    Domingo said: 2012.01.06 05:58

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

  3. spacer
    Michael said: 2012.01.06 14:38

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

  4. spacer
    bronoman said: 2012.01.07 07:01

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

  5. spacer
    Juha Vainikka said: 2012.01.07 15:23

    Good stuff! Keep ‘em coming Bobby.

  6. spacer
    Ray Tayek said: 2012.01.07 21:44

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

    thanks

  7. spacer
    John Wagenleitner said: 2012.01.08 11:56

    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 grails.org/Grails+Screencasts.

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

    [...] 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 said: 2012.01.10 02:32

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

  10. spacer
    bobby said: 2012.01.10 07:53

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

  11. spacer
    bobby said: 2012.01.10 07:53

    @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. spacer
    bobby said: 2012.01.10 07:54

    @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 said: 2012.01.10 08:01

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

  14. spacer
    Mahboob said: 2012.01.14 02:44

    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.

    Cheers,
    – MH

  15. spacer
    bobby said: 2012.01.15 08:09

    @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. spacer
    bobby said: 2012.01.15 08:11

    @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. spacer
    Mahboob said: 2012.01.16 05:17

    Hi Bobby,

    I took the RegisterController.groovy as per your suggestion, and noted the dependent files as:
    AbstractS2UiController.groovy
    RegistrationCode.groovy
    messages.spring-security-ui.properties
    DefaultUiSecurityConfig.groovy

    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?

    Cheers,
    – MH

  18. spacer
    bobby said: 2012.01.16 11:22

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

  19. spacer
    Steve said: 2012.01.18 04:18

    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. spacer
    batman said: 2012.02.08 04:32

    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?

Your Comment

Change mind? Click here to cancel.
spacer
spacer
*

Switch to our mobile site

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.