Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. import grailsbb.*
  2.  
  3. class BootStrap {
  4.  
  5. def springSecurityService
  6.  
  7. def init = { servletContext ->
  8. user = new User(
  9. firstName:"Chris",
  10. lastName:"Jordan",
  11. email:"chris.s.jordan@gmail.com",
  12. username:"cjordan",
  13. password:springSecurityService.encodePassword("csj001"),
  14. enabled: true
  15. ).save()
  16. forum = new Forum(title:"Grails", moderators:[user]).save()
  17. subForum = new SubForum(title:"Grails Development", description:"This is where we will discuss development revolving around the Grails framework.").save()
  18. thread = new Thread(subject:"GrailsBB Rocks!", forum:forum).save()
  19. }
  20. def destroy = {
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement