发表于: 2017-11-20 23:14:25

1 639


今天完成的事情:

1. 尝试配置tubsy

2. 看了几个dome,有了大致思路



明天计划的事情

1.接着Tuscany

2. 测试一下跑通

3. 听演讲去


遇到的问题:

<component name="StudentCalculator">
   <implementation.spring location="helloworld-context.xml" />
   <reference name="add" target="AddComponent"/>
</component>

红色的去不掉,怎么办?





收获:

1. 把几个模块给链接起来,能过相互调用

public class CountNumberServiceImpl implements CountNumberService {
@Reference
public void setStudentMapper(StudentMapper studentMapper) {
this.studentMapper = studentMapper;
}

private static Logger logCouNumSerImpl = LoggerFactory.getLogger(CountNumberServiceImpl.class);

<groupId>jnshu.tasknine</groupId>
<artifactId>tasknine</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
   <module>tasknine-core</module>
   <module>tasknine-service</module>
   <module>tasknine-web</module>
</modules>


2. 在service 调用core 

<dependency>
   <groupId>jnshu.tasknine</groupId>
   <artifactId>tasknine-core</artifactId>
   <version>1.0-SNAPSHOT</version>
</dependency>


private StudentMapper studentMapper;

public StudentMapper getStudentMapper() {
return studentMapper;
}

@Reference
public void setStudentMapper(StudentMapper studentMapper) {
this.studentMapper = studentMapper;
}

能把core 的jar打出来



3. 泛型

为了灵活的使用有可能变化的类型,例如一个方法可能传入的参数为String 或者 int ,可以用方法重载的方式,但是,如果是有多种类型就很麻烦,解决办法就是泛型

就是将类型由原来的具体的类型参数化,类似于方法中的变量参数,此时类型也定义成参数形式(可以称之为类型形参),然后在使用/调用时传入具体的类型(类型实参)。

 ListIterator<E> listIterator();
 <T> T[] toArray(T[] a);

public Box(T data) {

        this.data = data;21    

}

把类型作为参数传递,不必实现规定



进度: 

         任务开始时间:11.18

         预计完成时间:11.21

禅道:http://task.ptteng.com/zentao/project-task-264.htm





返回列表 返回列表
评论

    分享到