zoukankan      html  css  js  c++  java
  • dubbo

    provider

    <?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:dubbo="http://code.alibabatech.com/schema/dubbo"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://code.alibabatech.com/schema/dubbo 
        http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    <!-- 1,配置应用名称 -->
    <dubbo:application name="jt-dubbo-cart"/>
    <!-- 2,配置zookeeper的ip地址和端口号 -->
    <dubbo:registry timeout="9000000" address="zookeeper://192.168.132.140:2181"></dubbo:registry>
    <!-- 3,设置端口号,消费者通过网络访问这个提供者 -->
    <dubbo:protocol port="20886" name="dubbo"></dubbo:protocol>
    <!-- 4,配置实现类,创建对象 -->
    <bean class="com.jt.cart.service.CartServiceImpl" id="cartServiceImpl"></bean>
    <!-- 5, 公开对象,公开后,消费者只能通过网络访问-->
    <dubbo:service  interface="com.jt.cart.service.CartService" ref="cartServiceImpl">
    </dubbo:service>
    </beans>

    consumer

    <?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:dubbo="http://code.alibabatech.com/schema/dubbo"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://code.alibabatech.com/schema/dubbo 
        http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
        <!-- 1, 配置应用名称 -->
        <dubbo:application name="jt-dubbo-cart" />
        <!-- 2, 配置zookeeper -->
        <dubbo:registry timeout="900000"
            address="zookeeper://192.168.132.140:2181"></dubbo:registry>
        <!-- 3,配置接口 -->
        <!-- spring LoginController 调LoginService,从spring框架有@service LoginServiceImpl 
            @autowired LoginService @autowired CartService 加了refrence标签,@autowired CartService 
            spring调dubbo框架,dubbo框架从zookeeper找到实现类 -->
        <dubbo:reference timeout="50000" check="false"
            id="cartServiceImpl" interface="com.jt.cart.service.CartService"></dubbo:reference>
    
        <dubbo:reference timeout="50000" check="false" id="orderService"
            interface="com.jt.order.service.OrderService"></dubbo:reference>
            
            
        <dubbo:reference timeout="50000" check="false" id="searchServiceervice"
            interface="com.jt.search.service.SearchService"></dubbo:reference>
            
            
    </beans>
  • 相关阅读:
    SQL 窗口函数
    时间序列模型(三):指数平滑法
    时间序列模型(二):移动平均法(MA)
    时间序列模型(一):模型概述
    时间序列分析
    分类数据和顺序数据转换为标志变量
    数据标准化
    指数加权移动平均法(EWMA)
    适用于多品种情况的回归控制图
    SQL NOT NULL 约束
  • 原文地址:https://www.cnblogs.com/gxlaqj/p/11758463.html
Copyright © 2011-2022 走看看