Changeset 54 for trunk/grails-app/conf
- Timestamp:
- Nov 9, 2009, 2:04:00 PM (14 years ago)
- Location:
- trunk/grails-app/conf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/DataSource.groovy
r45 r54 35 35 * @see http://wiki.github.com/RobertFischer/autobase/example-usage 36 36 */ 37 dbCreate = 37 dbCreate = "update" 38 38 username = "gscf" 39 39 password = "dbnp" … … 42 42 driverClassName = "org.postgresql.Driver" 43 43 url = "jdbc:postgresql://localhost:5432/gscf" 44 dialect = org.hibernate.dialect.PostgreSQLDialect 44 45 45 46 // MySQL 47 //driverClassName = "com.mysql.jdbc.Driver" 46 48 //url = "jdbc:mysql://localhost/gscf" 49 //dialect = "org.hibernate.dialect.MySQL5InnoDBDialect" 47 50 48 51 //In memory 49 //driverClassName = "com.mysql.jdbc.Driver"50 52 //url = "jdbc:hsqldb:file:prodDb;shutdown=true" 51 53 } -
trunk/grails-app/conf/NimbleBootStrap.groovy
r53 r54 46 46 47 47 // Execute any custom Nimble related BootStrap for your application below 48 if (nimble.User.count() == 0) { 48 49 49 // Create example User account50 def user = InstanceGenerator.user()51 user.username = "user"52 user.pass = 'useR123!'53 user.passConfirm = 'useR123!'54 user.enabled = true50 // Create example User account 51 def user = InstanceGenerator.user() 52 user.username = "user" 53 user.pass = 'useR123!' 54 user.passConfirm = 'useR123!' 55 user.enabled = true 55 56 56 def userProfile = InstanceGenerator.profile()57 userProfile.fullName = "Test User"58 userProfile.owner = user59 user.profile = userProfile57 def userProfile = InstanceGenerator.profile() 58 userProfile.fullName = "Test User" 59 userProfile.owner = user 60 user.profile = userProfile 60 61 61 def savedUser = userService.createUser(user) 62 if (savedUser.hasErrors()) { 63 savedUser.errors.each { 64 log.error(it) 65 } 66 throw new RuntimeException("Error creating example user") 62 def savedUser = userService.createUser(user) 63 if (savedUser.hasErrors()) { 64 savedUser.errors.each { 65 log.error(it) 66 } 67 throw new RuntimeException("Error creating example user") 68 } 69 70 // Create example Administrative account 71 def admins = Role.findByName(AdminsService.ADMIN_ROLE) 72 def admin = InstanceGenerator.user() 73 admin.username = "admin" 74 admin.pass = "admiN123!" 75 admin.passConfirm = "admiN123!" 76 admin.enabled = true 77 78 def adminProfile = InstanceGenerator.profile() 79 adminProfile.fullName = "Administrator" 80 adminProfile.owner = admin 81 admin.profile = adminProfile 82 83 def savedAdmin = userService.createUser(admin) 84 if (savedAdmin.hasErrors()) { 85 savedAdmin.errors.each { 86 log.error(it) 87 } 88 throw new RuntimeException("Error creating administrator") 89 } 90 91 adminsService.add(admin) 92 67 93 } 68 69 // Create example Administrative account70 def admins = Role.findByName(AdminsService.ADMIN_ROLE)71 def admin = InstanceGenerator.user()72 admin.username = "admin"73 admin.pass = "admiN123!"74 admin.passConfirm = "admiN123!"75 admin.enabled = true76 77 def adminProfile = InstanceGenerator.profile()78 adminProfile.fullName = "Administrator"79 adminProfile.owner = admin80 admin.profile = adminProfile81 82 def savedAdmin = userService.createUser(admin)83 if (savedAdmin.hasErrors()) {84 savedAdmin.errors.each {85 log.error(it)86 }87 throw new RuntimeException("Error creating administrator")88 }89 90 adminsService.add(admin)91 94 } 92 95
Note: See TracChangeset
for help on using the changeset viewer.