[转载] 一篇不错的Spring Framework的tutorial

Spring对注解(Annotation)处理源码分析2——解析和注入注解配置的资源 1.类内部的注解,如:@Autowire、@Value、@Required、@Resource以及EJB和WebSerivce相关的注解,是容器对Bean对象实例化和依赖注入时,通过容器中注册的Bean后置处理器处理这些注解的。 2.Spring中处理注解的Bean后置处理器: 当使用Spring的注解功能时,在Spring配置文件中添加如下配置开启Spring的注解处理器: 阅读详情

[作者] Benoy Jose
[地址]
http://javaboutique.internet.com/tutorials/spring_frame/article.html
[点评] 介绍的比较全面,但也稍嫌单薄,是Rod Johnson在邮件列表中给的连接,说明还不错。

[原文]


Introduction
Officially the spring season might be over but spring still seems to be lingering around. If you did not get the smell of the Spring Framework this summer then you might be missing something. You might be having your fingers crossed skeptically about another run of the mill Framework system that we have been seeing for the last couple of years. Hundreds of open source and propriety frameworks have sprung all over the place making it difficult to identify what each framework does, so the skepticism is understandable, but before we write off spring like one of those others it might be worth briefly peeking through it. Spring proposes a new paradigm, a pluggable, non- intrusive and robust framework.


Summary
Unlike other frameworks and APIs, spring does not impose itself wholly on to the design of a project. Spring is modular and has been divided logically into independent packages, which can function independently. The architects of an application have the flexibility to implement just a few spring packages and leave out most of the packages in spring. The "Spring Framework" would not feel bad with this attitude and on the contrary encourages users to introduce Spring into existing applications in a phased manner. So no matter what kind of framework you are using now Spring will co-exist with it without causing you nightmares and further more Spring will allow you to choose specific packages in Spring.
The "Struts" framework is no doubt a good framework to enhance the ability of the web tier, but the biggest drawback is the fact that it caters only to the web tier and leaves most of the Enterprise tier or middle tier to the fancy of the application architects. The Application architects need to provide an additional framework to deal with the enterprise tier and make sure that the new framework integrates well with the Struts framework. Spring tries to alleviate this problem by providing a comprehensive framework, which includes an MVC framework, an AOP integration framework, a JDBC integration framework, and an EJB integration framework. It also provides integration modules for major O/R mapping tools like Hibernate and JDO. Spring provides all these in a modular fashion without imposing any layer on to the user. Spring is not a take-it-or- leave-it kind of framework. It tries to seamlessly blend into the existing framework users have without hindrances. Spring also provides transaction management support using Java classes, email support packages using framework classes, web services support through proxies and many more features like the above. As mentioned earlier all these packages are optional and spring does not make any of them mandatory. Spring can seamlessly integrate with existing applications and provide specific functionality that you intend to provide with minimal demands for customization. A user can continue to use Struts for the web tier and toplink O/R for the database and meanwhile hook spring to provide e-mail services and web services support. Spring is based on the Inversion of Control/Dependency Injection pattern that has been making rounds in message boards all over the Internet.


Inversion of Control/Dependency Injection
Dependency injection is kind of an Inversion of Control pattern. It is proposed as an alternative for the Service Locator. Martin flower discusses the Dependency Injection pattern, Inversion of Control pattern and the differences it has with the service locator in an article at his site (See resources below).

Dependency Injection proposes separating the implementation of an object and the construction of objects that depend on them. The job of coordinating the implementation and construction is left to the Assembler code. The object that needs to be implemented does not need to instantiate the dependent objects and can rely on the assembler to do the job. The assembler will gather and instantiate, if necessary, all the dependent objects and make them available to the implemented object. Since the assembler does not depend on the code directly changes can be made to the assembler without any changes to the code. The assembler gathers the required classes through configuration files so a change in the assembler only needs changes to the configuration file. In this case the Assembler code would be the spring framework.

Since the classes are independent and are integrated through the assembler, independent testing of each class can be done without affecting other application codes.

There are three types of Dependency Injections.

Type 1 IOC also called Interface Injection In Type 1 IOC the injection is done though an interface. The interface will define the injection method and the implementation class has to implement this interface and provide concrete implementation for the injection method.
Type 2 IOC also called Setter Injection In Type 2 IOC the injection is done via a setter method. Type 2 IOC uses setter methods to get the dependent classes it needs.
Type 3 IOC also called Constructor Injection. In Type 3 IOC implementing class defines a constructor to get all its dependents. The dependent classes are defined in the constructor arguments.

How does Spring Work?
The idea is that beans follow the Dependency Injection pattern. Beans have information on the classes dependent on them. Beans define their own attributes within bean descriptors and also define the beans they depend on in the same descriptors. The Bean does not need to locate and instantiate these classes using service locators or JNDI calls. The Assembler (Spring Framework in this case) takes care of finding these classes based on the information provided in the descriptor and makes them available to the calling class. The service locator pattern does almost the same job, so why do we need another pattern to do it. The class that needs the dependent classes needs to tell the Service Locator as to which classes are required by it and moreover the responsibility of finding these classes and invoking them falls on the calling class. This makes the classes tightly coupled with each other making them difficult to unit test them separately. In the case of the Dependency Injection pattern the responsibility is shifted to the Assembler to load these classes. The assembler can make changes to the dependent classes by simply modifying the descriptor file. Martin Flower’s article in the resources shows the comparison between Dependency Injection and Service Locator with a good example.


Beans, BeanFactory and Application Context
The basic package in the spring framework is the org.springframework.beans package. Spring framework uses JavaBeans and this package provides most of the basic functionality to manipulate Java beans and provides the basic infrastructure for the other spring framework classes. This package also provides the basis for the "Dependency injection" pattern that Spring is based on.

There are two ways in which clients can use the functionality of the Spring Framework--the BeanFactory and the ApplicationContext. The BeanFactory is a generic factory, which stores the information about all the Spring Beans and allows the user to instantiate beans and manage them. The BeanFactory provides programmers with the facilities to implement the basic features of the Spring Framework. The ApplicationContext builds on top of the BeanFactory and inherits all the basic features of the Spring Framework. Apart from the basic features, ApplicationContext provides additional features like Event management, internationalization support and resource management.

The BeanFactory is particularly useful in low memory situations like in an Applet where having the whole API would be overkill. It provides the basic spring framework features and does not bring all the excess baggage that ApplicationContext has. ApplicationContext helps the user to use Spring in a framework oriented way while the BeanFactory offers a programmatic approach.

 

BeanFactory
A BeanFactory is like a factory class that contains a collection of beans. The BeanFactory holds BeanDefinitions of multiple beans within itself and then instantiates the bean whenever asked for by clients.

XMLBeanFactory is a BeanFactory implementation provided within the Spring Framework. The XMLBeanFactory can read BeanDefinitions from a XML file directly. The XMLBeanFactory validates the XML using a DTD file called beans.dtd and checks for inconsistencies in the XML.


Bean Class
The Bean, which is stored in the BeanFactory, is the actual class that would carry the logic for the bean. Spring does not define any standards on how the bean needs to be structured. Any J2EE complaint bean structure is acceptable to Spring. Unlike Struts and other frameworks the beans do not need to implement any special Spring interfaces to make them work in the Spring Framework. Depending upon the kind of Inversion required the bean might have to follow the rules of the corresponding Inversion Dependency pattern. Spring supports only Constructor based injection and setter based injection. So a bean that used constructor-based injection should have to define constructors accordingly. Spring recommends setter-based injection over constructor-based injection as multiple constructors can make the bean huge and unmanageable.

A bean has one or more IDs associated with it. The ID should be unique within the BeanFactory it is contained in so that the BeanFactory can look up the bean using the ID. If a bean has multiple IDs they are defined as aliases for the bean.

The spring framework takes care of how the beans can be created and sent back to clients. Beans can be deployed as singletons or as non-singletons. If a bean is defined as a singleton then only one instance of the bean is created by the BeanFactory and returned when a request for the bean is made. All subsequent requests get the same instance which was created first. Non- singleton beans or Prototype beans can have multiple instances created. So each time a request is made for a bean to the BeanFactory a new instance is created and returned. The BeanFactory cannot do Lifecycle management of a prototype bean, as a new instance is created for each client who requests it(Lifecycle management of a bean is discussed in a subsequent section).


BeanDefinition
The BeanDefinition contains all the information required by the BeanFactory to instantiate the bean. This includes any dependencies the bean may have on other beans and how the bean needs to be configured in the container. When a request is made for a bean, the BeanFactory loads the corresponding BeanDefinition and instantiates the bean. The BeanDefinition has information on how the bean would be instantiated (Singleton or prototype) and callback methods defined in the Lifecycle section.


Lifecycle of a Bean
After the bean is initialized the BeanFactory can use callback methods to change the behavior of the bean in the BeanFactory. One of the callback methods is the init-method. The InitializingBean interface of the factory package gives the ability to do initialization work after properties are set up for a bean in the BeanFactory. The afterPropertiesSet () method in the InitializingBean interface allows the user to check if all the properties are set properly or if some operation has to be done after the properties have been set. All Bean classes that need to use this callback method need to implement the InitializingBean interface and implement the afterPropertiesSet () method. If the initialization work is minimal the user has the flexibility to designate a method within the bean, which will be invoked after bean properties have been set. The designated method, which would do the initialization, can be then be specified in the init-method attribute of the bean. Designating the init-method attribute can help to avoid implementing the InitializingBean interface.

In a similar fashion a DisposableBean interface is provided to do cleanup operations after a bean is destroyed. The bean has a destroy-method attribute that can used to designate a method within the bean, which will do the clean up work when the BeanFactory destroys the bean.

Other Features:

Spring can automatically resolve the dependent beans with the help of the BeanFactory. This facility can reduce the need to specify properties or constructor arguments.
Spring can check dependencies on a bean. It can check for values that should be set when a bean is initialized. If the check is not done the BeanFactory will set the default value. This behavior is not mandatory and can be turned on when required.
Spring can also manage multiple resource files for you.

Sample
Lets go through a sample to illustrate a few of the important ideas outlined above. Shown below is a snippet of XML that defines some BeanDefinitions of an actual bean.


<bean id = ‘helloWorldSample′ class=”com.helloworld.samples.HelloWorld” depends-on = ”boostrapClassId”><property name=”myString”>My famous Hello World Program</property><property name=”dependentClassId”>  <ref bean = “firstDependentClass”/></property></bean> <bean id = “firstDependentClass” class = “com.helloworld.dependent.FirstDependentClass” destroy-method=”cleanupMethod”><property name=”dependentString”>My famous Hello World Program needs me</property><bean><bean id = “bootstrapClassId” class = “com.helloworld.config.BootStrapClass” init-method = “loadPropertiesFromFile”>
The sample above shows a BeanDefinition for a HelloWorld Class, which depends upon the BootStrapClass class. The property ‘myString’ would translate into a field into the bean with a default value specified within it. Since the BeanFactory knows that this bean requires the class FirstDependentClass, it would instantiate that class before it sets the reference for that class in the main bean. The property "dependentClassId" would also become a field in the bean with a reference to the FirstDependentClass. The loadProertiesFromFile method which is specified as a init method will be invoked after properties have been set to the BootStrapClass bean.


Application Context
The ApplicationContext provides a framework type of API to Spring. The framework allows the user to use a ContextLoader to load beans. The ContextLoader does the job of the BeanFactory. The ApplicationContext provides all the features offered by BeanFactory and allows the user to add some additional features. Some of the features offered by the ApplicationContext are MessageSources, Resource management and Event Propagation.

MessageSource offers an i18n type messaging facility. Event Propagation allows Spring to have an event handling mechanism. The Event handling is done via the ApplicationEvent Class and the ApplicationListener interface. Every bean that’s wants to be notified of any events would implement the ApplicationListener Interface. Whenever an ApplicationEvent takes place the ApplicationContext knows about it. The ApplicationContext would notify the beans that are listening to this event.


Additional Support
Spring provides a lot of additional modules, which are optional to the framework. The User has the flexibility to use them, as they need them in their application. Some of these features are briefly discussed below.

Spring AOP
Spring does not need Aspect Oriented Programming (AOP) to function as a framework. AOP enhances the Spring middleware support by providing declarative services. The declarative services can be used as replacements for the EJB declarative services used in CMTs. The EJB "declarative services" are provided by Spring using the "declarative transaction management service." Transaction management services are based on the spring transaction management, which will be discussed next.

Transaction Management
Spring provides a simple programmatic transaction management API. Spring provides support for both declarative transaction management and programmatic transaction management. Declarative transaction management is used in EJB container managed transactions (CMT) and programmatic transaction management is used in EJB bean managed persistence. Additionally Spring can use transaction management to avoid the use of EJBs where not required.
Data Access using JDBC
The org.springframework.jdbc package provides all the JDBC related support required by the application. One of the interesting interfaces within this package is the SQLExceptionTranslator. The translator can help in providing translations from the very common and generic SQLException in to something more specific and informative. SQLExceptions are too generic and cannot provide any great information that can be passed back to the user. Spring’s wrapper (SQLExceptionTranslator) can implemented specific to a vendor and can provide informative error messages, which can be sent back to the user.

O/R Mapping
Spring provides integration with OR mapping tools like Hibernate, JDO and iBATIS. (For information on Hibernate see resources below). Spring provides very good support for Hibernate. Spring augments the power of Hibernate by providing support for Hibernate sessions, Hibernate transaction management and other features in Hibernate.
Spring Web Framework
Spring provides a pluggable MVC architecture. The users have a choice to use the web framework or continue to use their existing web framework. Spring separates the roles of the controller; the model object, the dispatcher and the handler object which makes it easier to customize them. Spring web framework is view agnostic and does not push the user to use only JSPs for the view. The user has the flexibility to use JSPs, XSLT, velocity templates etc to provide the view.
Spring And EJB
In a usual EJB application EJBs are located using service locators and managed using business delegates. These results in EJB JNDI look ups scattered all over the code. Spring can provide proxy objects, which can act as business delegates do the same job. These proxies can be configured into the BeanFactory and the ApplicationContext.
Conclusion
Spring is very new to the market and provides a new lease of life to framework development. Spring does not try to duplicate existing solutions; it tries to integrate with exiting solutions like JDO, AOP and Hibernate. However spring creates a new web framework to replace Struts, as the creators of Spring feel that Struts is not robust enough. Spring would generate great interest in the coming months as more people become aware of it and find it worthwhile to implement. Spring is portable across application servers, as it does not include any application server or platform specific requirements. This makes it compatible on major application servers like Websphere, Weblogic, Tomcat, Jboss and others like them. As of now spring can be integrated and used in a eclipse IDE, however as the versions improve spring should be providing support for more IDEs.
Benoy Jose is a web developer with over six years of experience in J2EE and Microsoft technologies. He is a Sun Certified programmer and enjoys writing technical and non-technical articles for various magazines.

 

--------------------------------------------------------------------------------

Spring Boot Tutorial 《Spring Boot 教程》 NULL 博文链接:https://sunbin.iteye.com/blog/2397999 立即下载

相关推荐

Spring教程 spring tutorial

spring tutorial 教程

如何用Processing创作算法艺术:从入门到实践的完整指南

Processing是一款强大的开源编程环境,专为艺术家、设计师和创意编程爱好者打造。它结合了简洁的Java语法和直观的图形库,让你能够通过代码创造出令人惊艳的视觉艺术作品。无论你是编程新手还是有经验的开发者,都能快速上手并实现自己的创意想法。 ## 🎨 Processing核心功能与优势 Processing的核心优势在于其简单易学的语法和丰富的图形绘制能力。通过简洁的API,你可以轻松创

gitblog_00514的博客 620

[VisionPro] CogPMAlignTool 工具详解

[VisionPro] [CogPMAlignTool] [模板匹配]

weixin_43163656的博客 1万+

如何让群晖NAS智能识别所有硬盘?Synology_HDD_db实用指南

你是否遇到过这样的困扰:为群晖NAS购买了性价比高的第三方硬盘,却看到存储管理器里显示"不兼容"的红色警告?或者想使用现有的SSD提升系统性能,却被系统限制无法启用TRIM功能? 今天,我们要介绍的Synology_HDD_db项目,就是一个能够智能扩展群晖NAS硬盘兼容性的开源解决方案。它不仅能让你自由选择各种品牌的硬盘、SSD和NVMe驱动器,还能恢复被限制的系统功能,让NAS真正成为你的存

gitblog_00059的博客 549

2.6 SST的核心性能指标体系

本文构建了固态变压器(SST)的核心性能指标体系,涵盖电气性能、可靠性、经济性和环境适配性四大类指标。电气性能指标包括运行效率(≥97%)、功率密度(≥900kVA/m³)、谐波畸变率(≤3%)等关键参数;可靠性指标设定MTBF≥43800h、年均故障率≤1.2次/年等标准;经济性指标对比分析了初始购置成本(45-55万元)和全生命周期成本(48-55万元);环境适配性指标则明确了温度、海拔等工况要求。该体系采用量化公式和国标限值,为SST的性能测试、选型和优化提供了统一标准。

技术工作者 615

解读文献(五)------基于阻抗控制

文章目录背景主动柔顺控制阻抗控制基于力的阻抗控制基于位置的阻抗控制力位混合控制 背景 主动柔顺控制 阻抗控制 基于力的阻抗控制 基于位置的阻抗控制 力位混合控制 ...

accumulation 1万+

Generic Interfaces (C# Programming Guide)

https://msdn.microsoft.com/en-us/library/kwtft8ak(v=vs.140).aspx It is often useful to define interfaces either for generic collection classes, or for the generic classes that represent items in the ...

weixin_30294021的博客 134

Python爬虫实战:避开巨潮资讯网反爬,稳定获取上市公司年报PDF下载地址

本文详细介绍了如何使用Python和Selenium突破巨潮资讯网的动态加载限制,稳定获取上市公司年报PDF下载地址。通过模拟真实用户操作、智能等待策略和反反爬虫技巧,帮助开发者高效爬取财经数据,适用于股票代码查询和年报分析等场景。

weixin_29065659的博客 1675

Spring系列03分模块开发

引入其他配置文件 Spring系列03 文章目录引入其他配置文件前言一、回顾Spring配置二、引入配置文件接口的实现类1.图解2.getBean方法使用总结 前言 在实际开发中,Spring的配置内容非常多,这就导致Spring配置很繁杂而且体积很大,所以,可以将部分配置拆解到其他配置文件中,而在Spring主配置文件通过import标签进行加载 提示:以下是本篇文章正文内容,下面案例可供参考 一、回顾Spring配置 二、引入配置文件接口的实现类 1.图解 import numpy as n

weixin_51128948的博客 308

【面试题】MySQL索引相关的面试题(红黑树,hash,B树,B+树)

自己整理了几个面试题分享给大家 问题1:红黑树为什么那样设计? 首先聊一下二叉搜索树,主要特点是左节点比根节点小,右节点比根节点大,并且左右子树都是二叉搜索树。缺点是在极端情况下,比如插入都是有序的,就会出现退化的情况有序序列树退化成链表。 二叉搜索树 退化成链表的二叉搜索树 此时,要想让树的节点平均分布就需要平衡树了,红黑树就是平衡树的一种(平衡二叉搜索树)。然后,一棵树的查询性能取决...

Mr_黑_ 的博客 4048

安装西门子TIA Portal V15.1提示先决条件不足如何处理?

安装TIA Portal STEP 7 Professional WinCC Professional V15.1提示先决条件不足,需要如何才能够满足安装条件呢? 1.硬件要求: 安装 STEP 7 Basic / Professional V15.1 的计算机必须至少满足以下需求: 处理器: Core i5-6440EQ 3.4 GHz 或者相当 内存: 16GB或者更多(对于大型项目,为32GB) 硬盘:SSD,配备至少50GB的存储空间 图形分辨率:最小 1920 x 1080 显示器:15.6"

Robot_PLC_HMI_Automation 2万+

Spring Tutorial - A Baby Step to Learn

转自:http://www.dineshonjava.com/2012/06/spring-30-baby-step-to-learn.html#.WL0h-vmGNPY Spring Tutorial - A Baby Step to Learn Posted by Dinesh Rajput In this series of spring tut

albertjone的博客 609

c#仿热血江湖

Int32_1 = (int) table.Rows[i]["FLD_初级附魂"],Int32_2 = (int) table.Rows[i]["FLD_中级附魂"],Int32_3 = (int) table.Rows[i]["FLD_是否绑定"],Int32_0 = (int) table.Rows[i]["FLD_进化"],Form1.smethod_1(2, "加载百宝阁物品----没有百宝阁数据");Form1.smethod_1(2, "加载物品商店----没有物品数据");

weixin_42132177的博客 147

【超分辨率(Super-Resolution)】关于【超分辨率重建】专栏的相关说明,包含专栏简介、专栏亮点、适配人群、相关说明、阅读顺序、超分理解、实现流程、研究方向、论文代码数据集汇总等

本专栏研究领域为【超分辨率重建】,涵盖图像超分、视频超分,实时超分,4K修复等方面。主要内容包括主流算法模型的论文精读、论文复现、毕业设计、涨点手段、调参技巧、论文写作、应用落地等方面。算法模型从SRCNN开始更新至今,一般是一篇论文精读对应一篇论文复现。论文精读详解理论,归化繁为简,归纳核心,积累词句,培养阅读论文和论文写作能力。论文复现依托Pytorch代码,实现完整的模型训练流程,总结调参方法,记录碰到的bug,论文插图可视化,培养读写代码能力、做实验的能力、以及应用落地能力。

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 3万+

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

Spring Tutorial

黄博文系列 Spring-Context之一:一个简单的例子 Spring-Context之二:使用Spring提供的测试框架进行测试 Spring-Context之三:使用XML和Groovy DSL配置Bean Spring-Context之四:Spring容器及bean的定义 Spring-Context之五:基于构造器进行依赖注入 Spring-Context之六:基于S...

224

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

spring配置文件bean标签 name属性取值语法问题,(新手问题多)--小问题总结都在这里

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.

anyway, life must全力以赴 1809

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

Spring Boot Tutorial - 引导一个简单的应用程序

1.概述 Spring Boot是对Spring平台的一种固定的,根据约定实现默认配置。 - 对于以最小的努力开始并创建独立的生产级应用程序非常有用。 本教程是Boot的起点 - 一种使用基本Web应用程序以简单方式入门的方法。 我们将介绍一些核心配置,前端,快速数据操作和异常处理。 2.设置 首先,让我们使用Spring Initializr为我们的项目生成基础。 生成的项目依赖于Boot父级:...

五石之瓠 以为大樽 浮于江湖 悠笑人生 356

基于maven管理的项目中spring+mybatis配置数据源读取不到properties属性文件的问题

此时,启动会报异常,${jdbc.driver}这样的表达式获取不到properties里面的值,因为MapperScannerConigurer实际是在解析加载bean定义阶段的,这个时候要是设置sqlSessionFactory的话,会导致提前初始化一些类,这个时候,PropertyPlaceholderConfigurer还没来得及替换定义中的变量,导致把表达式当作字符串复制了,解决的办法如

a925907195的专栏 6240

vaadin系列(一)框架和spring整合

14. Object Relational Mapping (ORM) Data Access 14.1 Introduction to ORM with Spring The Spring Framework supports integration with Hibernate, Java Persistence API (JPA), Java Da

3432

spring 构造器注入

Constructor-based dependency injection Constructor-based DI is accomplished by the container invoking a constructor with a number of arguments, each representing a dependency. Calling a static 

seven_7small的专栏 876

spring官方文档中文

https://docs.spring.io/spring/docs/current/spring-framework-reference/ 不习惯看英文文档的朋友,可以使用Google Chrome打开连接,右键翻译成中文即可

皮一下很开心的猴头 2万+

Hibernate的分析【收藏】

一、Hibernate是JDBC 的轻量级的对象封装,它是一个独立的对象持久层框架,和App Server,和EJB没有什么必然的联系。Hibernate可以用在任何JDBC可以使用的场合,例如Java应用程序的数据库访问代码,DAO接口的实现类,甚至可以是BMP里面的访问数据库的代码。从这个意义上来说,Hibernate和EB不是一个范畴的东西,也不存在非此即彼的关系。 二、Hibernate是

PUPU的专栏 1598
上一篇: EJB中的Message-Driven Bean理解!
下一篇: [转载]61条面向对象设计的经验原则
baoprogrammer
博客等级 码龄26年 0粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址