| package services.hello; public interface HelloService { String hello(String message); } |
| package services.hello; import org.osoa.sca.annotations.*; @Service(HelloService.class) public class HelloServiceImpl implements HelloService { public String hello(String message) } |
| <?xml version="1.0" encoding="ASCII"?> <componentType xmlns=http://www.osoa.org/xmlns/sca/1.0> <service name="HelloService"> <interface.java interface="services.hello.HelloService"/> </service> </componentType> |
| package services.hello; import org.osoa.sca.annotations.*; @Service(HelloServiceImpl.class) public class HelloServiceImpl implements AnotherInterface { public String hello(String message) … } |
| package services.hello; public class HelloServiceImpl implements AnotherInterface { public String hello(String message) … } |
| <?xml version="1.0" encoding="ASCII"?> <componentType xmlns=http://www.osoa.org/xmlns/sca/1.0> <service name="HelloService"> <interface.java interface="services.hello.HelloServiceImpl"/> </service> </componentType> |
| package services.hello; import org.osoa.sca.annotations.*; @Service(interfaces={HelloService.class, AnotherInterface.class}) public class HelloServiceImpl implements HelloService, AnotherInterface { public String hello(String message) … } |
| <?xml version="1.0" encoding="ASCII"?> <componentType xmlns=http://www.osoa.org/xmlns/sca/1.0> <service name="HelloService"> <interface.java interface="services.hello.HelloService"/> </service> <service name="AnotherService"> <interface.java interface="services.hello.AnotherService"/> </service> </componentType> |
| service 1 package services.hello; public interface HelloService { String hello(String message); } service 2 package services.hello; public interface HelloService2 extends HelloService {} |
| package services.hello; import org.osoa.sca.annotations.*; @Service(interfaces=) public class HelloServiceImpl implements HelloService { public String hello(String message) } |
| <?xml version="1.0" encoding="ASCII"?> <componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"> <service name="HelloService"> <interface.java interface="services.hello.HelloService"/> </service> <service name="HelloService2"> <interface.java interface="services.hello.HelloService2"/> </service> </componentType> |
用户评论