The code in this artifact is designed to be used specifically with Spring versions 4.3 and above.
A module is analogous to a Guice module, and is designed to consist of the registration of a number of beans. Spring generally doesn’t care about which interfaces a bean is tied to, once registered it will find the bean with all of the interfaces it uses.
Spring has this "concept" by simply allowing a Module to have an @Import
statement that holds multiple
beans to register (and even cascading registration) so the concept is generally of limited usefulness.
However, pair this with the gen-code-scanner
plugin, this
allows scan based wiring at runtime, which is an enormous performance boost over runtime scanning.
The reason for this is covered more in the Connect CD principles documentation.
This allows a number of different ways of registering servlets. The JerseyModule in
connect-java-servlet-spring-jersery
descends from it. It allows registering of servlets
through a simple fluid syntax in a Consumer<Definition>
callback or detection of @WebServlet
or @WebFilter
annotations.