Document StandardTypeLocator configuration to support user types
Prior to this commit, it was unclear to users and third parties that it is necessary to manually configure a StandardTypeLocator with a specific ClassLoader to ensure that the SpEL expression parser is able to reliably locate user types. For example, the StandardBeanExpressionResolver in the spring-context module configures a StandardTypeLocator using the bean ClassLoader of the corresponding BeanFactory. This commit improves the documentation to raise awareness of this fact. Closes gh-26253
This commit is contained in:
@@ -38,5 +38,15 @@ Kotlin::
|
||||
----
|
||||
======
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
If your application or framework manages its own `EvaluationContext`, you may need to
|
||||
manually configure a `StandardTypeLocator` with a specific `ClassLoader` to ensure that
|
||||
the SpEL expression parser is able to reliably locate user types.
|
||||
|
||||
For example, the `StandardBeanExpressionResolver` in the `spring-context` module
|
||||
configures a `StandardTypeLocator` using the bean `ClassLoader` of the corresponding
|
||||
`BeanFactory`.
|
||||
====
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user