Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to create SpringManagedContext programmatically #16400

Closed
snicoll opened this issue Jan 3, 2020 · 4 comments · Fixed by #16401
Closed

Make it easier to create SpringManagedContext programmatically #16400

snicoll opened this issue Jan 3, 2020 · 4 comments · Fixed by #16401
Milestone

Comments

@snicoll
Copy link
Contributor

snicoll commented Jan 3, 2020

If one wants to set up a SpringManagedContext programmatically, they have to create an instance with the default constructor and then call a setter. That's not a great arrangement IMO and the following would be much easier:

// Config config = ...
config.setManagedContext(new SpringManagedContext(applicationContext));

See also spring-projects/spring-boot#19487

@mmedenjak
Copy link
Contributor

@snicoll thank you for the report! Does this PR provide what you would expect? #16386

@snicoll
Copy link
Contributor Author

snicoll commented Jan 3, 2020

Thanks for the feedback. No, it does not. Did you reference the wrong PR maybe?

@mmedenjak
Copy link
Contributor

Ah, ok, now I see the difference. The additional constructor should be simple enough to add.

@mmedenjak
Copy link
Contributor

@snicoll created #16401

@mmedenjak mmedenjak added this to the 4.0 milestone Jan 3, 2020
@mmedenjak mmedenjak added the Source: Community PR or issue was opened by a community user label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants