Skip to content

Commit 183698b

Browse files
authored
Merge pull request #14970 from apache/remove-servletContext-bootstrap
fix: remove ServletContext from generated and test BootStrap.groovy files
2 parents 0c0cfe8 + 812790b commit 183698b

25 files changed

Lines changed: 12 additions & 78 deletions

File tree

grails-data-graphql/plugin/grails-app/init/gorm/graphql/BootStrap.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package gorm.graphql
2121

2222
class BootStrap {
2323

24-
def init = { servletContext ->
24+
def init = {
2525
}
2626
def destroy = {
2727
}

grails-data-neo4j/examples/grails3-neo4j-hibernate/grails-app/init/BootStrap.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class BootStrap {
2121

22-
def init = { servletContext ->
22+
def init = {
2323
}
2424
def destroy = {
2525
}

grails-data-neo4j/examples/grails3-neo4j/grails-app/init/BootStrap.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class BootStrap {
2121

22-
def init = { servletContext ->
22+
def init = {
2323
}
2424
def destroy = {
2525
}

grails-data-neo4j/examples/test-data-service/grails-app/init/example/BootStrap.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package example
2121

2222
class BootStrap {
2323

24-
def init = { servletContext ->
24+
def init = {
2525
}
2626
def destroy = {
2727
}

grails-doc/src/en/guide/upgrading/upgrading60x.adoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,11 @@ These limits can be customized using `server.tomcat.max-part-count` and `server.
408408
`server.tomcat.max-part-header-size` defalt is 512B
409409

410410
https://docs.spring.io/spring-boot/appendix/application-properties/index.html#application-properties.server.server.tomcat.max-part-count[Spring Boot Common Application Properties]
411+
412+
===== 12.16 servletContext no longer included by default in generated Bootstrap init{}
413+
414+
The `servletContext` is no longer included by default in the generated `Bootstrap` class. If you need access to the `servletContext`, you can inject it into your `Bootstrap` class using:
415+
416+
```console
417+
ServletContext servletContext
418+
```

grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/lang/groovy/bootStrap.rocker.raw

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,8 @@ under the License.
2323

2424
package @project.getPackageName()
2525

26-
import jakarta.servlet.ServletContext
27-
2826
class BootStrap {
2927

30-
ServletContext servletContext
31-
3228
def init = {
3329
}
3430

grails-profiles/base/skeleton/grails-app/init/@grails.codegen.defaultPackage.path@/BootStrap.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
package @grails.codegen.defaultPackage@
22

3-
import jakarta.servlet.ServletContext
4-
53
class BootStrap {
64

7-
ServletContext servletContext
8-
95
def init = {
106
}
117

grails-test-examples/app1/grails-app/init/functionaltests/BootStrap.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919

2020
package functionaltests
2121

22-
import jakarta.servlet.ServletContext
23-
2422
class BootStrap {
2523

26-
ServletContext servletContext
27-
2824
def init = {
2925
Book.withTransaction {
3026
new Book(title:"Example Book").save(flush:true)

grails-test-examples/app2/grails-app/init/BootStrap.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
* under the License.
1818
*/
1919

20-
import jakarta.servlet.ServletContext
21-
2220
class BootStrap {
2321

24-
ServletContext servletContext
25-
2622
def init = {
2723
}
2824

grails-test-examples/app3/grails-app/init/app3/BootStrap.groovy

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@
1919

2020
package app3
2121

22-
import jakarta.servlet.ServletContext
23-
2422
class BootStrap {
2523

26-
ServletContext servletContext
27-
2824
def init = {
2925
}
3026

0 commit comments

Comments
 (0)