Package org.springframework.stereotype

# Annotation Interface Controller

@Target(TYPE) @Retention(RUNTIME) @Documented @Component public @interface Controller
Indicates that an annotated class is a "Controller" (for example, a web controller).

This annotation serves as a specialization of `@Component`, allowing for implementation classes to be autodetected through classpath scanning. It is typically used in combination with annotated handler methods based on the `org.springframework.web.bind.annotation.RequestMapping` annotation.

Since:
  2.5
Author:
  Arjen Poutsma, Juergen Hoeller
See Also:
  - `Component`
  - `org.springframework.web.bind.annotation.RequestMapping`
  - `ClassPathBeanDefinitionScanner`

## Optional Element Summary

Optional Elements
Modifier and Type
Optional Element
Description
`String`
`value`
Alias for `Component.value()`.

## Element Details

### value

@AliasFor(annotation=Component.class) String value
Alias for `Component.value()`.

Default:
  ""