java - Guice + classpath scanning -
i looking @ guice @ moment , appear geared towards explicit programmatic building of context via modules.
now used using annotations put context , using classpath scanning build context.
now add "feature" guice, i'd rather not reinvent wheel, if knows if there extension - please say.
however, question is, breaking desired use , design of guice doing this...have missed point of how/why guice meant used in enterprise application?
guice has pretty smart jit binding makes unnecessary scan-per type (concrete types example) in situations if there not actual binding required (e.g. interface-to-implementation, etc.).
i find package-scanning components in spring mess. fact have explicitly filter out don't want, , 'sub-packages' (which mean nothing in language) scanned default, no simple way package types in (without ugly filter code , reflection) extremely fragile , error-prone. guice's approach far more elegant (convention of module per package). in short, find myself being explicit in spring of time maintain sanity :)
Comments
Post a Comment