发表于: 2017-05-19 23:40:50

1 1343


今天完成的事:

参照例子:http://blog.csdn.net/liu312312/article/details/8551155

将昨天spring 封装RMI失败的例子删掉了,并重新参考上面的网址的例子完成的spring封装RMI的例子

然后尝试将之前Task中mybatis访问数据库的内容添加到service中但是获取不到值(目前还未解决)

public class BaseserviceTest {

/**
    *Title:main
    *Description:
    * @param args
    */
   public static void main(String[] args) {
StudentService studentService=new StudentServiceImpl();
       // TODO Auto-generated method stub
       ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-*.xml");
//        BaseService baseService = (BaseService) context.getBean("baseRmiService");
      Student student=new Student();
       try{
student=studentService.getStudentById(8);
       }catch (Exception e){
e.printStackTrace();
       }
System.out.println("baseRmiServicee start..........."+student);
   }

}

明天计划的事:仔细对比查看配置实现访问数据库

遇到的问题:service分离后mybatis配置

收获:无

总结:好好学习。


返回列表 返回列表
评论

    分享到