zoukankan      html  css  js  c++  java
  • Dubbox服务的消费方配置

    在src/main/resources下创建applicationContext-web.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:p="http://www.springframework.org/schema/p"

        xmlns:context="http://www.springframework.org/schema/context"

        xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:mvc="http://www.springframework.org/schema/mvc"

        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd

            http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd

            http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd

            http://www.springframework.org/schema/context 

    http://www.springframework.org/schema/context/spring-context.xsd">

     

        <mvc:annotation-driven >

            <mvc:message-converters register-defaults="false">

                <bean class="org.springframework.http.converter.StringHttpMessageConverter"> 

                    <constructor-arg value="UTF-8" />

                </bean> 

            </mvc:message-converters>

        </mvc:annotation-driven>

        <!-- 引用dubbo 服务 -->

        <dubbo:application name="dubboxdemo-web" />

        <dubbo:registry address="zookeeper://192.168.25.132:2181"/>

         <dubbo:annotation package="cn.itcast.dubboxdemo.controller" />

    </beans>

  • 相关阅读:
    java并发
    jvm虚拟机
    L2Dwidget二次元前端添加人物插件
    MySQL数据库之rowid
    MySql支持emoji表情设置
    zookeeper不能正常启动问题(转)
    jd-gui-windows-1.6.6.zip反编译工具
    为什么es集群至少需要三个节点(转)
    超好用的uniapp弹出层
    netcore5.0 使用新的Microsoft.Data.SqlClient
  • 原文地址:https://www.cnblogs.com/cn-chy-com/p/11118683.html
Copyright © 2011-2022 走看看