The advantage is that you only focus on writing business methods in your component class and let the life cycle of the component be handled by Spring configuration files.
这样做的优势在于,只需将重点放在编写组件类中的业务方法上,而由Spring 配置文件处理组件的生命周期。
The ContextLoaderListener class creates a Web application context to hold information about the Spring-specific resources of your application.
contextloaderlistener类创建一个Web应用程序上下文以保存应用程序中特定于Spring的资源信息。
This sets a system-wide property, which is read by the factory class used to switch between integration implementations, this time using the Spring model.
此文本将设置一个系统范围的属性,该属性可被工厂类读取,用于在集成实现之间进行切换,此时使用Spring模型。
While Spring may have been what pushed the team to make these changes, they're useful for any class for which this might be a problem.
虽然Spring可能已迫使团队做出了这些更改,但它们对任何类都有用这一点可能会成为一个问题。
Spring comes with a variable resolver implementation class that lets you reference Spring managed beans in JSF expressions.
Spring附带了一个变量解析器实现类,允许您在JSF表达式中引用 Spring托管Bean。
By default, when a component is detected, Spring will automatically generate a "bean name" using the non-qualified class name.
默认的,组件被侦测到的时候,Spring会自动生成一个没有修饰符的类名作为bean名字。
Spring defines a coherent data access exception class hierarchy (Figure 12) that you can use as a basis for your service- and DAO-layer exceptions.
Spring定义了一致的数据访问异常类层次结构(请参见图12),您可以将其用作服务和DAO 层异常的基础。
Even with the class and the Spring configuration file in place, you're not quite ready to run this code yet.
即使这个类和Spring配置文件已经就绪,您也还没有准备好运行这段代码。
The SCA annotations for explicitly declaring the SCA services, references, and properties within your Spring bean class are described below.
下面介绍了用于在Springbean类内显式地声明SCA服务、引用和属性的 SCA注释。
In this case, the JBoss interface is identical to the interceptors I defined for Spring, except that the imported class names are different.
在这种情况下,JBoss接口与我为Spring定义的截取程序是相同的,不同的是导入的类名。
The @Transactional annotation, part of the Spring Core package, specifies the transaction semantics of the annotated class or method.
作为Spring核心包一部分的 @Transactional注释指定了注释的类或方法的事务语义。
When using this extended class, I can change the assembler using the standard Spring idiom and fall back to default behavior if I need to.
在使用这个扩展的类时,可以用标准Spring语言改变装配器,并在需要时回到默认的行为。
Enhance the bean definition in the Spring configuration file to reflect the wrapper class.
加强Spring配置文件中的bean的定义,以反射包装类。
Switching an implementation class now becomes a matter of simply modifying the Spring configuration file.
切换实现类现在成了一件非常简单的事情,只需修改Spring配置文件即可。
Constructor injection in Spring lets you inject your dependencies through class constructors.
Spring中的构造函数注入允许您通过类构造函数注入依赖关系。
In both cases you need to declare the dependency (e.g. using the Spring configuration file) and add a corresponding constructor or mutator method to the dependent object class.
在这两种情况下,您都需要声明依赖项(例如使用Spring配置文件),并向依赖对象类添加对应的构造函数或mutator方法。
The Cglib2AopProxy class is part of the Spring framework and is used to generate dynamic proxy objects.
cglib2aopproxy类是Spring框架的一部分并用于生成动态代理对象。
Spring provides an expression resolver for JSF in a class named org.springframework.web.jsf.DelegatingVariableResolver.
spring在名为or g . springframework . web .jsf . DelegatingVariableResolver的类中提供了jsf表达式解析器。
To simplify the generation of BeanDefinition metadata, Spring 2.0 introduces a handy new BeanDefinitionBuilder class, offering a fluent, builder-style API.
为了简化BeanDefinition元数据的生成,Spring 2.0引入了一种方便的新的BeanDefinitionBuilder类,提供一种流畅的、构建器风格的API。
Similarly, the Apache Tuscany sca runtime allows you to explicitly declare the sca services, references, and properties within your Spring bean class using sca annotations.
同样地,ApacheTuscanysca运行时允许您使用sca注释在Springbean类内显式地声明sca服务、引用和属性。
Create beans.xml, define the service class as a Spring bean using HTTP binding, and publish it as a JAX-WS endpoint.
创建beans . xml,使用HTTP绑定将这个服务类定义为Springbean,将其作为JAX - WS端点发布。
The Blether service USES the JpaTemplate utility class that the Spring framework provides to add additional methods for JPA.
Blether服务使用Spring框架提供的JpaTemplate实用工具类来为jpa添加其他方法。
The BeanNameAutoProxyCreator class is part of the Spring IOC framework and automatically creates bean proxies.
beannameautoproxycreator类是SpringIOC框架的一部分,可以自动创建bean代理。
Listing 10 shows the Spring registration helper class.
代码清单10显示了Spring注册helper类。
At its simplest, you can use Spring JMX to register objects using the MBeanExporter class.
在最简单的情况下,可以用Springjmx以mbeanexporter类注册对象。
Terracotta for Spring USES aspect-oriented technologies to adapt the application at class load time.
Terracotta forSpring使用aspect - oriented技术来在类载入时适配应用。
Listing 2 shows the Spring XML configuration file for the RadiologyDepartment class.
清单2显示了radiologydepartment类的SpringXML配置文件。
Considering getters and setters: a class that USES a Spring bean needs to provide at least a setter method, which corresponds to the name of the particular bean.
关于getter和setter:使用了Springbean的类至少要有一个setter方法,该方法对应于特定bean的名称。
The GAE does not allow writing to the local file system, which is a prerequisite of the Spring AxiomSoapMessageFactory class.
GAE不允许写入本地文件系统,但那是Spring axiomsoapmessagefactory类的先决条件。
Listing 10: Warsaw project main application class with example usage of Spring bean injection mechanism and annotation-based web page scanner.
清单10:warsaw项目的主应用类,其中示范了Spring类注入机制和基于注解的Web页面扫描器的使用。
应用推荐