Spring @MVC configuration without XML | Gene De Lisa
Setting up the app contexts
Since we are avoiding writing XML config files, I suggest that instead of using the XmlWebApplicationContext class, use the AnnotationConfigWebApplicationContext which supports classpath scanning for Spring annotation based configuration. You can explicitly add configuration classes, or have the context scan for them.
To start up and shut down the context, we add a ContextLoaderListener.
Read full article from Spring @MVC configuration without XML | Gene De Lisa
No comments:
Post a Comment