发表于: 2020-01-12 20:29:19

1 1235


一、今天完成的事

编写dal框架

client的xml

<?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:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

   <context:annotation-config/>
   <context:component-scan base-package="com.jnshu"/>


   <bean id="scaClient"
         class="com.gemantic.common.sca.service.SCAClientBean">
       <property name="resource" value="client.composite"/>
   </bean>


   <!-- VideoService  -->
   <bean id="videoService"
         class="com.gemantic.common.sca.service.SCAClientServiceFactory">
       <property name="client" ref="scaClient" />
       <property name="component" value="VideoServiceComponent" />
       <property name="className"
                 value="com." />
   </bean>


   <!-- performance -->

   <aop:aspectj-autoproxy/>
   <bean id="aroundLoggingTime" class="com.gemantic.common.stat.aop.time.AroundTimeConsume"/>
   <aop:config>
       <aop:aspect ref="aroundLoggingTime">
           <aop:pointcut id="publicServiceMethod"
                         expression="execution(* com.gemantic..service.*.*(..)) &amp;&amp; (!execution(* com.gemantic.common.sca.service.*.*(..)))"/>
           <aop:around method="around" pointcut-ref="publicServiceMethod"/>
       </aop:aspect>
   </aop:config>
</beans>

clint.properties

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns:scallop="http://scallop/xmlns/sca/1.0" name="HomeComposite"
 targetNamespace="http://sns.sohu.com/home/composite" xmlns="http://www.osoa.org/xmlns/sca/1.0">

 <component name="ApplicationServiceComponent">
   <implementation.java class="com.ptteng.sca.fans.common.client.VideoSCAClient"/>
   <reference name="videoService">
     <scallop:binding.rmi registryName="dal-service-rmi"
       serviceName="VideoRMIService"/>
   </reference>
 </component>
</composite>

单例测试

public class VideoTest {
@Autowired
   VideoService videoService;

   private static final Log log = LogFactory.getLog(VideoTest.class);

   @Test
   public void getVideo() throws ServiceException, ServiceDaoException {
Long id=1L;
           Video video = videoService.getVideoById(id);
           log.info("get video data is " + video);
           log.info("-------------------------get application end----------------------");

   }
}

二、遇到的问题

还是没运行起来

可能是数据库为空,或者其他原因

三、收获

四、明天的计划

修改bug


返回列表 返回列表
评论

    分享到