@Documented @Retention(value=RUNTIME) @Target(value={TYPE,ANNOTATION_TYPE}) public @interface Service
For instance the following service:
@Service
public interface TransferService {
public void transfer(Account accountSource, Account accountTarget);
}
with its implementation:
public class TransferServiceBase implements TransferService {
public void transfer(Account accountSource, Account accountTarget) {
...
}
}
can be used as follows:
@Inject TransferService transferService;
Copyright © 2013-2016–2016 SeedStack. All rights reserved.