SpringSource/spring-scala — pull request #13 by hekonsek (2013-04-12 01:11:26+00:00)
Title: Added component scan mini DSL.

Hi,

I've added `ContextSupport#componentScan` methods to provide elegant way to enable component scanning in `FunctionalConfiguration`.

We can either configure scanning via named parameters...

class ExcludingComponentScanConfig extends FunctionalConfiguration with ContextSupport {

componentScan(basePackages = Seq("org.springframework.scala.context.function"),
excludeFilters = Seq(new RegexPatternTypeFilter(Pattern.compile(".*Component"))),
scopedProxy = ScopedProxyMode.TARGET_CLASS)

}

...or via varArged list of base packages...

class VarArgComponentScanConfig extends FunctionalConfiguration with ContextSupport {

componentScan("com.packageone", "com.packagetwo")

}

What do you think? Javadoc on pull request acceptance, as usually :)

Cheers.