发表于: 2017-11-22 18:48:27
1 605
今日完成:
完成了不能打包,不能部署的tuscany服务端。
明日计划:
找一个实用的知识点来准备小课堂,在复盘项目前不能松懈,要加油。
今日成果:
那些命名空间哪些有用哪些没用不知道,不敢删改。其中servicename要和配置文件的name对应,要一模一样,composite的targetNamespace和name是随意设置的,
<?xml version="1.0" encoding="UTF-8"?>
<composite
xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
xmlns:scallop="http://scallop/xmlns/sca/1.1"
targetNamespace="http://sample"
name="Calculator" >
<component name="ServiceComponent">
<!--该服务的spring配置文件地址-->
<implementation.spring location="spring-config.xml"/>
<service name="ServicesDao">
<!--服务的接口-->
<interface.java interface="com.jnshu.rmi.ServicesDao"/>
<tuscany:binding.rmi uri="https://127.0.0.1:4396/tuscany"/>
</service>
</component>
</composite>
这里的service name和上面的service name对应,type放接口的路径,传给这个的target放实现类。
<sca:service name="ServicesDao" type="com.jnshu.rmi.ServicesDao" target="Services"/>
<bean id="Services" class="com.jnshu.rmi.Services"/>
主方法调用:
Node node = NodeFactory.newInstance().createNode(
"Calculator.composite");
node.start();
System.out.println("service启动");
遇到的困难:
看不懂异常和报错,网上也难搜解决方案。
进度:
任务九提交
准备复盘项目和自我提升
禅道:http://task.ptteng.com/zentao/my-task.htm
评论