I can use ';' and EOL for delimiter of base-package attribute(component scan) [SPR-12523] #17128
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: documentation
A documentation task
Milestone
Masahiko Kudo opened SPR-12523 and commented
Document say "Alternatively, you can specify a comma-separated list that includes the parent package of each class.", but I can use ';' and EOL for delimiter of base-package attribute.
Like
<context:component-scan base-package="org.springframework.jira;org.springframework.ticket" />
It is not so bad.
But I found ComponentScanBeanDefinitionParser use ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS as delimiters.(at ComponentScanBeanDefinitionParser#parse)
CONFIG_LOCATION_DELIMITERS is ",; \t\n", then I can use ';' and EOL as delimiter.
It looks evil...CONFIG_LOCATION_DELIMITERS says it is "Any number of these characters are considered delimiters between multiple context config paths in a single String value."
Please make other const for ComponentScan.
And decide extends or fix specification of delimiter.
Affects: 4.0.8, 4.1.2
Referenced from: commits 6f2de28, 39fbfbd
Backported to: 4.0.9
The text was updated successfully, but these errors were encountered: