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(); }
}
Service and Repository mean the same thing and exist so a class can say
which layer it belongs to, as they do in Spring.
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
-