Annotation Type Component
Marks a class the build constructs and injects, once per server.
The build finds the class, works out what its constructor and its
@Autowired members need, and writes the new into the entry point it
generates. Nothing is looked up at run time: there is no container, no
registry and no reflection, and a dependency that cannot be satisfied is a
build error that names the injection point.
@Component
public class Clock {
public long now() { return System.currentTimeMillis(); }
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
-