Spring框架学习

Spring是一个轻量级且模块化的企业级应用框架,提供IoC容器、声明性事务管理、MVC框架和AOP支持。它简化了对象依赖关系的管理,允许与多种数据访问和Web框架无缝集成,并具备非侵入性设计,便于代码维护。
摘要由CSDN通过智能技术生成

记录一下上班第一天自学了些什么
该文章参考添加链接描述

Spring是什么

The Spring Framework is a lightweight solution and a potential one-stop-shop for building your enterprise-ready applications. However, Spring is modular, allowing you to use only those parts that you need, without having to bring in the rest. You can use the IoC container, with any web framework on top, but you can also use only theHibernate integration code or the JDBC abstraction layer. The Spring Framework supports declarative transaction management, remote access to your logic through RMI or web services, and various options for persisting your data. It offers a full-featured MVC framework, and enables you to integrate AOP transparently into your software.
Spring is designed to be non-intrusive, meaning that your domain logic code generally has no dependencies on the framework itself. In your integration layer (such as the data access layer), some dependencies on the data access technology and the Spring libraries will exist. However, it should be easy to isolate these dependencies from the rest of your code base.

官方文档大致意思是,Spring框架是一个为了简化企业级应用开发的框架,这是一个轻量级解决方案,也是一站式解决方案,Spring是模块化的,只允许您使用所需的部分,而不必引入其余部分。您可以使用loC容器(Spring通过loC容器来管理所有Java对象的实例化和初始化,控制对象与对象之间的依赖关系),上面有任何web框架,但也可以只使用Hibernate继承代码或JDBC抽象层。Spring Framework支持声明性事务管理、通过RMI或web服务对逻辑的远程访问,以及用于持久化数据的各种选项。它提供了一个功能齐全的MVC框架,并使您能够将AOP透明的集成到软件中。
Spring被设计为非侵入性的,这意味着您的域逻辑代码通常对框架本身没有依赖关系。在集成层(如数据访问层)中,江村在对数据访问技术和Spring库的一些依赖关系。但是,隔离这些依赖关系应该很容易。

Spring带来了什么

Spring除了不能帮我们写业务逻辑,却能帮助我们简化开发,有以下几点:
1.Spring能帮我们根据配置文件创建及组装对象之间的依赖关系。
2.Spring面向切面编程呢能帮助我们无耦合的实现日志记录,性能统计,安全控制。
3.Spring能非常简单的帮我们管理数据库事务。
4.Spring还提供了与第三方数据访问框架(如Hibernate、JPA)无缝集成,而且自己也提供了一套JDBC访问模板,来方便数据库访问。
5.Spring还提供与第三方Web(如Struts、JSF)框架无缝集成,而且自己也提供了一套SpringMVC框架,来方便web层搭建。
6.Spring能方便的与JavaEE(如Java Mail、任务调度)整合,与更多技术整合(比如缓存框架)。

Spring的好处

先了解一些专业名词

  • 应用程序:是能完成我们所需要功能的成品,比如购物网站、OA系统、ERP系统。
  • 框架:是能完成一定功能的半成品,比如我们可以使用框架进行购物网站开发;框架能做一部分功能,我们自己做一部分功能,这样应用程序创建出来了

-------------------------------先这样2023.6.27

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值