@@ -159,9 +159,8 @@ The steps involved in using dynamic-language-backed beans are as follows:
159
159
element in the XML configuration (you can define such beans programmatically by
160
160
using the Spring API, although you will have to consult the source code for
161
161
directions on how to do this, as this chapter does not cover this type of advanced configuration).
162
- Note that this is an iterative step. You need at least one bean
163
- definition for each dynamic language source file (although multiple bean definitions can reference the same dynamic language source
164
- file).
162
+ Note that this is an iterative step. You need at least one bean definition for each dynamic
163
+ language source file (although multiple bean definitions can reference the same source file).
165
164
166
165
The first two steps (testing and writing your dynamic language source files) are beyond
167
166
the scope of this chapter. See the language specification and reference manual
@@ -578,9 +577,12 @@ If you do not use the Spring namespace support, you can still use the
578
577
<bean class="org.springframework.scripting.support.ScriptFactoryPostProcessor"/>
579
578
----
580
579
581
- NOTE: As of Spring Framework 4.3.3, you may also specify a Groovy `CompilationCustomizer`
582
- (such as an `ImportCustomizer`) or even a full Groovy `CompilerConfiguration` object
583
- in the same place as Spring's `GroovyObjectCustomizer`.
580
+ NOTE: You may also specify a Groovy `CompilationCustomizer` (such as an `ImportCustomizer`)
581
+ or even a full Groovy `CompilerConfiguration` object in the same place as Spring's
582
+ `GroovyObjectCustomizer`. Furthermore, you may set a common `GroovyClassLoader` with custom
583
+ configuration for your beans at the `ConfigurableApplicationContext.setClassLoader` level;
584
+ this also leads to shared `GroovyClassLoader` usage and is therefore recommendable in case of
585
+ a large number of scripted beans (avoiding an isolated `GroovyClassLoader` instance per bean).
584
586
585
587
586
588
0 commit comments