Avoid JNDI property lookup attempts for invalid JNDI keys [SPR-14518] #19087
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Juergen Hoeller opened SPR-14518 and commented
As indicated by spring-projects/spring-boot#6460, when running in a Servlet environment, Spring tries to resolve property names in JNDI (even if they are typically not actually found there). The performance impact of this has been raised in #18598 already, leading to the introduction of the "spring.jndi.ignore" property in 4.3. However, even with that option around, it still seems wasteful to try a JNDI lookup for property keys which are clearly invalid in JNDI's naming scheme. We should try to bypass JNDI lookups for such keys by default.
Affects: 4.2.7, 4.3.1
Referenced from: commits 328e04f, 7021a4b, 4e94e84
Backported to: 4.2.8
The text was updated successfully, but these errors were encountered: