It's sample of pojo
public interface HelloWorld {
String sayHello(String name);
}public class HelloWorldImpl implements HelloWorld {
public String sayHello(String name) {
return "hello " + name;
}
}make file "META-INF/spring/hello.bean.xml" to resources directory
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util" xmlns:cse="http://www.huawei.com/schema/paas/cse/rpc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://www.huawei.com/schema/paas/cse/rpc classpath:META-INF/spring/spring-paas-cse-rpc.xsd">
<cse:rpc-schema schema-id="helloworld"
implementation="com.huawei.paas.cse.helloworld.server.HelloWorldImpl"></cse:rpc-schema>
</beans>import com.huawei.paas.cse.provider.pojo.RpcSchema;
@RpcSchema(schemaId = "helloworld")
public class HelloWorldImpl implements HelloWorld {
...
}make file "META-INF/spring/hello.bean.xml" to resources directory
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans classpath:org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="com.huawei.paas.cse.helloworld.server" />
</beans>how to start the service center
mvn test -Pservermvn test -Pclient