Skip to content

Possibility to use an ApplicationContextInitializer in CommandLineJobRunner [BATCH-1917] #1666

@spring-projects-issues

Description

@spring-projects-issues

Sebastien Lorber opened BATCH-1917 and commented

Hello,

On:
org.springframework.batch.core.launch.support.CommandLineJobRunner#start

We can't customize the initialization of the: org.springframework.context.support.ClassPathXmlApplicationContext

This may lead to the creation of a subclass of CommandLineJobRunner which will duplicate a lot of code from the parent method.

It would be nice if another method was providing an empty/default ApplicationContextInitializer that we could override, so that we could activate spring profiles or add additional propertysources without duplicating a lot of code that may lead to a framework version coupling.
This would be nice for users of Spring 3.1


Affects: 2.1.9

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions