Spring优点

Benefits of using spring framework:

  1. Using POJOs. you do not need an EJB container product such as an application server but you have the option of using only a robust servlet container such as Tomcat or some commercial product.

  2. Spring is organized in a modular fashion. Even though the number of packages and classes are substantial, you have to worry only about ones you need and ignore the rest.

  3. Spring makes use of some of the existing technologies like several ORM frameworks, logging frameworks, JEE, Quartz and JDK timers and other view technologies.

  4. Easy to test the application written with Spring: Environment dependent code is moved into this framework. By using JavaBean style POJOs, it becomes easier to use dependency injection for injecting test data.

  5. Spring’s web framework is a well-designed web MVC framework, which provides a great alternative to web frameworks such as Struts or other over engineered or less popular web frameworks.

  6. Convenient API to translate technology-specific exceptions(thrown by JDBC, Hibernate, or JDO, for example) into consistent, unchecked exceptions.

  7. Lightweight IoC containers. This is beneficial for developing and deploying applications on computers with limited memory and CPU resources.

  8. Spring provides a consistent transaction management interface that can scale down to a local transaction(using a single database, for example) and scale up to global transactions(using JTA, for example).

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容