Skip to content

Allow IllegalArgumentException When resolving classes in the CustomEditorConfigurer [SPR-4563] #9240

@spring-projects-issues

Description

@spring-projects-issues

Jim Kriz opened SPR-4563 and commented

Requesting an enhancement to allow ClassNotFound and other related exceptions in the CustomEditorConfigurer.postProcessBeanFactory method. We have a situation where we have set our context to lazily init all beans by default. Since the CustomEditorConfigurer is a BeanFactoryPostProcessor, it is instantiated and the postProcessBeanFactory method is invoked despite being lazily initialized. This would typically not be an issue, except that some of the classes we are registering PropertyEditor's for are not actually included in our classpath. This is by design - we want to have one single context configuration (consisting of many related context files) being consumed by many different clients. By setting the beans to lazily init, the client can choose which dependent jars it needs, based on what functionality it requires. In this particular case, one client does not need any of the functionality related to classes which are set up in the CustomEditorConfigurer, but it is forced to include them in order to successfully load the context.


Affects: 2.5.2

Attachments:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions