A good memory is better than a bad pen. 89-spring3 Study (-SPRING3) common schema (continuous finishing)

Source: Internet
Author: User

Spring3 has many schema schemas that correspond to many different functions. Using these common schemas allows us to avoid reinventing the wheel and improving our development efficiency.
I thought this is a very common information, to the online casually tidy up can be completed, may use the keyword is wrong, how to find also did not find relatively comprehensive.

Just so-called, good memory is not as bad as writing, oneself can collect the finishing down, later need to find information can be convenient point.

Spring-beans-3.0.xsd

用途:spring3最主要的schema,用于配置bean命名空间: http://www.springframework.org/schema/beansSchema文件: http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

P namespace

用户:简化XML配置命名空间:http://www.springframework.org/schema/p引入方法:xmlns:p="http://www.springframework.org/schema/p"因为p命名空间中的属性名是可变的,因此他没有对应的schema定义文件,也不需要在xsi:schemaLocation中为p命名空间指定schema定义文件。

Spring-context-3.0.xsd

用途:它提供了通过扫描类包,以应用注解定义bean的方法,spring2.5以后提供命名空间: http://www.springframework.orghttp://www.springframework.org/schema/tx/spring-context-3.0.xsd样例:<context:component-scan base-package=”com.dao”/>Spring容器会扫描com.dao下面所有的类,并且从类的注解中获取bean的定义信息;Context命名空间的方法比较多,比如:resource-pattern 属性过滤特定的类;Regex 方法,采用正则表达式对目标的类名进行过滤等。

Spring-tx-3.0.xsd

用途:用于声明式事务配置定义命名空间: http://www.springframework.orghttp://www.springframework.org/schema/tx/spring-tx-3.0.xsd

Spring-aop-3.0.xsd

用途:AOP(面向切面)的配置定义命名空间: http://www.springframework.org/schema/aopSchema文件:http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

Spring-mvc-3.0.xsd

用途:用于MVC的配置,spring3.0新增命名空间: http://www.springframework.org/schema/mvcSchema文件:http://www.springframework.org/schema/aop/spring-mvc-3.0.xsd

Pring-jdbc-3.0.xsd

用途:用于spring内嵌数据库提供的配置,spring3.0新增命名空间: http://www.springframework.org/schema/jdbcSchema文件:http://www.springframework.org/schema/aop/spring-jdbc-3.0.xsdspring内嵌数据库又是一个什么样东东呢?

Spring-lang-3.0.xsd

用途:spring3.0新增了对JRuby和Groovy等动态语言的支持命名空间: http://www.springframework.org/schema/langSchema文件:http://www.springframework.org/schema/aop/spring-lang-3.0.xsd

Pring-oxm-3.0.xsd

用途:用于配置对象XML映射的schema,spring3.0新增命名空间: http://www.springframework.org/schema/oxmSchema文件:http://www.springframework.org/schema/aop/spring-oxm-3.0.xsd

Spring-task-3.0.xsd

用途:任务调度的定义和配置命名空间:http://www.springframework.org/schema/taskSchema文件:http://www.springframework.org/schema/task/spring-task-3.0.xsd

A good memory is better than a bad pen. 89-spring3 Study (-SPRING3) common schema (continuous finishing)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.