• controler--application配置


    <?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 >
    <!-- 将传输的字符串强制转换成utf-8编码, 防止中文乱码 -->
    <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:application name="dubboxdemo-web" />
    <!-- 配置连接zookepper -->
    <dubbo:registry address="zookeeper://192.168.200.128:2181"/>
    <!-- 配置包扫描, 只有在这个包下面才可以注入service -->
    <dubbo:annotation package="cn.lijun.controller" />
    </beans>

  • 相关阅读:
    Python 基础 (三)
    Python 基础(二)
    软件工程第四周作业
    软件工程第四周作业
    软件工程第四次作业
    软件工程第四周作业
    软件工程第三次作业
    软件工程第三周作业
    软件工程第三次作业
    Python学习之路5
  • 原文地址:https://www.cnblogs.com/lijun6/p/12029765.html
Copyright © 2020-2023  润新知