| 注释类型 | 说明 |
|---|---|
| Component |
“@Component”
is equals to:
<component name="abc" class="com.sample.Abc" />”
“@Component's name will be the class's getClass.getName();
Component not open for the client, so default no need name,
but if you call the component from the client, you can use
the @Component's name(class's getClass.getName()). |
| Consumer |
Consumer of the producer annotated with @send(topic) of the method;
* Topic/queue(1:N or 1:1):
if a class annotated with @Consumer(XX); it must implements
com.jdon.domain.message.DomainEventHandler
the @Send(topicName) ==> @Consumer(topicName);
if there are many consumers, execution order will be
alphabetical list by Name of @Consumer class.
|
| Interceptor |
the @Interceptor("aroundAdvice") if there is no any component call this class
(MethodInterceptor), the MethodInterceptor will
action for all components called by client (by
AppUtil.getService or WebApp.getService)
the @Interceptor(name = "myInterceptor", target = "a,c") if there is target
value, this class will be only available for the target
component name, not for all components called by client
|
| Introduce | |
| Model |
Domain Model should normal live in memory not in database. so cache in memory
is very important for domain model life cycle.
|
| Service |
the @Service(="abc")
is equals to:
<Service name="abc" class="com.sample.Abc" />
Service'name is called by the client. |
| Singleton |
the @Component
is equals to:
<component name="abc" class="com.sample.Abc" />
the @Component's name will be the class's getClass.getName();
Component not open for the client, so default no need name,
but if you call the component from the client, you can use
the @Component's name(class's getClass.getName()). |
Copyright © 2018. All rights reserved.