This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
grails-data-service/grails-app/init/example
grails-hibernate/grails-app/init/functional/tests
issue450/grails-app/init/multitenantcomposite Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 11package example
22
3+ import jakarta.servlet.ServletContext
4+
35class BootStrap {
46
5- def init = { servletContext ->
7+ ServletContext servletContext
8+
9+ def init = {
610 }
11+
712 def destroy = {
813 }
914}
Original file line number Diff line number Diff line change 11package functional.tests
22
3+ import jakarta.servlet.ServletContext
34import org.grails.orm.hibernate.HibernateDatastore
45
56class BootStrap {
67
8+ ServletContext servletContext
79 HibernateDatastore hibernateDatastore
810
9- def init = { servletContext ->
11+ def init = {
1012 assert hibernateDatastore. connectionSources. defaultConnectionSource. settings. hibernate. getConfigClass() == CustomHibernateMappingContextConfiguration
1113 Product . withTransaction {
1214 new Product (name : " MacBook" , price : " 1200.01" ). save()
1315 }
1416 }
17+
1518 def destroy = {
1619 }
1720}
Original file line number Diff line number Diff line change @@ -2,13 +2,15 @@ package multitenantcomposite
22
33import grails.gorm.multitenancy.Tenants
44import groovy.transform.CompileStatic
5+ import jakarta.servlet.ServletContext
56
67@CompileStatic
78class BootStrap {
89
10+ ServletContext servletContext
911 BookService bookService
1012
11- def init = { servletContext ->
13+ def init = {
1214 String grailsId = UUID . randomUUID(). toString()
1315 Tenants . withId(" grails" ) {
1416 bookService. save(grailsId, " The definitive Guide to Grails 2" )
You can’t perform that action at this time.
0 commit comments