Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.66 KB | None | 0 0
  1. import grailsbb.*
  2.  
  3. class BootStrap {
  4.  
  5.     def springSecurityService
  6.    
  7.     def init = { servletContext ->
  8.         def 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.         def forum = new Forum(title:"Grails").save()
  17.         forum.addToModerators(user);
  18.         def subForum = new SubForum(title:"Grails Development", description:"This is where we will discuss development revolving around the Grails framework.").save()
  19.         def thread = new Thread(subject:"GrailsBB Rocks!", subForum:subForum).save()
  20.     }
  21.     def destroy = {
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement