Skip to content

Declarative registration for ApplicationContextInitializer [SPR-8274] #12922

@spring-projects-issues

Description

@spring-projects-issues

Scott Andrews opened SPR-8274 and commented

We need to be able to augment the application environment when our library is deployed in an application. Currently, we use an ApplicationContextInitializer that must be registered in web.xml for every application that wishes to utilize. We would like to remove the need to register the initializer in web.xml.

An ApplicationContextInitializer should be automatically discoverable without requiring manual user registration.

I propose we use classpath*:META-INF/spring.bootstrap to register via the class path. Inside this file:

initializer=com.example.MyApplicationContextInitializer

This file can also be used for other bootstrapping concerns in the future.


Affects: 3.1 M1

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions