本系列博文包含 h5全栈 java全栈Python基础、前端开发、Web框架、缓存以及队列等,希望可以给正在学习编程的童鞋提供一点帮助!!!

测试demo 配置

<?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="com.offcn.controller" />
</beans>

posted on 2019-11-10 19:42  李俊互联网技术传播者  阅读(170)  评论(0编辑  收藏  举报