站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

Component (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.stereotype
Annotation Type Component


@Target(value=TYPE)
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface Component

Indicates that an annotated class is a "component". Such classes are considered as candidates for autodetected Spring beans when using annotation-based configuration and classpath scanning.

Other class-level annotations may be considered as identifying a component as well, typically a special kind of component: e.g. the Repository annotation or AspectJ's Aspect annotation.

Since:
2.1
Author:
Mark Fisher
See Also:
ClassPathScanningCandidateComponentProvider

Optional Element Summary
 String value
          The value may indicate a suggestion for a logical component name, to be turned into a Spring bean in case of an autodetected component.
 

value

public abstract String value
The value may indicate a suggestion for a logical component name, to be turned into a Spring bean in case of an autodetected component.

Returns:
the suggested component name, if any
Default:
""

The Spring Framework

Copyright © 2002-2007 The Spring Framework.