β

Spring Java-based配置

arganzheng's Weblog 178 阅读

Spring目前为止支持如下三种配置方式:

  1. XML-based configuration: Spring 1.0
  2. Annotation-based configuration (with component scanning): Spring 2.0
  3. Java-based configuration Spring 3.0

servlet 3之后,web.xml中的配置也可以通过java类来。

WebApplicationInitializer

参考文章

  1. Consider Replacing Spring XML Configuration with JavaConfig
  2. Spring App Migration: From XML to Java-based Config 非常详细的迁移文章,而且使用了component scanning。
  3. Spring 4 MVC HelloWorld Tutorial – Annotation/JavaConfig Example Spring MVC配置示例
  4. Spring bean management using Java configuration
作者:arganzheng's Weblog
原文地址:Spring Java-based配置, 感谢原作者分享。

发表评论