[SHL-106] Support JavaConfig configuration of Application Context used for Spring Shell plugins Created: 08/Aug/13  Updated: 19/Mar/15

Status: Open
Project: Spring Shell
Component/s: None
Affects Version/s: 1.0.0
Fix Version/s: 2.0 M1

Type: New Feature Priority: Major
Reporter: Daniel Ling Assignee: Unassigned
Resolution: Unresolved Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Passing a @Configuration annotated class to the Bootstrap constructor should be sufficient to support JavaConfig configuration of the Application Context used for Spring Shell plugins.



 Comments   
Comment by Daniel Ling [ 08/Aug/13 ]

Sent a pull request with code to support this: https://github.com/SpringSource/spring-shell/pull/14

Comment by Mark Pollack [ 01/Apr/14 ]

I believe this can be implemented in a much more simple way by allowing you to pass in either a string or Class refs to

ClassPathBeanDefinitionScanner scanner = new ClassPathBeanDefinitionScanner(ctx);
scanner.scan("org.springframework.shell.commands", "org.springframework.shell.converters", "org.springframework.shell.plugin.support");

as compared to the approach in the PR that duplicates a fair bit of code and brings in AnnotatedBeanDefinitionReader and not piggybacking on top of
ClassPathBeanDefinitionScanner.

Also, it shouldn't be either/or, both locations 'JavaConfig' as well as classpath*:/META-INF/spring/spring-shell-plugin.xml should be able to contribute commands simultaneously.

Comment by Robin Howlett [ 16/Dec/14 ]

Created SHL-106: Java Configuration support #66 pull request to add support for Java Configuration using ClassPathBeanDefinitionScanner, permitting mixing XML and Java Configuration support for Commands.

Generated at Mon Jan 21 09:25:52 UTC 2019 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.