1 Dubbo概念
2 搭建微服务SpringBoot多模块项目 1.POM dubboone.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 <project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion > 4.0.0</modelVersion > <parent > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-starter-parent</artifactId > <version > 2.1.3.RELEASE</version > <relativePath /> </parent > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <modules > <module > dubboone-api</module > <module > dubboone-modle</module > <module > dubboone-server</module > </modules > <groupId > com.dubboOne</groupId > <artifactId > dubboone</artifactId > <version > 0.0.1-SNAPSHOT</version > <name > dubboone</name > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <packaging > pom</packaging > <description > Demo project for Spring Boot</description > <properties > <java.version > 1.8</java.version > </properties > <dependencies > <dependency > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-starter</artifactId > </dependency > <dependency > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-starter-test</artifactId > <scope > test</scope > </dependency > </dependencies > <build > <plugins > <plugin > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-maven-plugin</artifactId > </plugin > </plugins > </build > </project >
dubboone-api 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 <project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion > 4.0.0</modelVersion > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <parent > <groupId > com.dubboOne</groupId > <artifactId > dubboone</artifactId > <version > 0.0.1-SNAPSHOT</version > <relativePath /> </parent > <groupId > com.dubboOne.api</groupId > <artifactId > dubboone-api</artifactId > <version > 0.0.1-SNAPSHOT</version > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <packaging > jar</packaging > <name > dubboone-api</name > <description > Demo project for Spring Boot</description > <properties > <java.version > 1.8</java.version > <mybatis-pagehelper.version > 4.1.2</mybatis-pagehelper.version > <lombok.version > 1.16.10</lombok.version > </properties > <dependencies > <dependency > <groupId > javax.validation</groupId > <artifactId > validation-api</artifactId > <version > 1.1.0.Final</version > </dependency > <dependency > <groupId > org.hibernate</groupId > <artifactId > hibernate-validator</artifactId > <version > 5.3.5.Final</version > </dependency > <dependency > <groupId > com.github.pagehelper</groupId > <artifactId > pagehelper</artifactId > <version > ${mybatis-pagehelper.version}</version > </dependency > <dependency > <groupId > org.projectlombok</groupId > <artifactId > lombok</artifactId > <version > ${lombok.version}</version > </dependency > </dependencies > <build > <plugins > <plugin > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-maven-plugin</artifactId > </plugin > </plugins > </build > </project >
dubbo-modle 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 <project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion > 4.0.0</modelVersion > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <parent > <groupId > com.dubboOne</groupId > <artifactId > dubboone</artifactId > <version > 0.0.1-SNAPSHOT</version > <relativePath /> </parent > <groupId > com.dubboone.modle</groupId > <artifactId > dubboone-modle</artifactId > <version > 0.0.1-SNAPSHOT</version > <name > dubboone-modle</name > <description > Demo project for Spring Boot</description > <properties > <java.version > 1.8</java.version > <mybatis-spring-boot.version > 1.1.1</mybatis-spring-boot.version > <mybatis-pagehelper.version > 4.1.2</mybatis-pagehelper.version > </properties > <dependencies > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <dependency > <groupId > com.dubboOne.api</groupId > <artifactId > dubboone-api</artifactId > <version > 0.0.1-SNAPSHOT</version > </dependency > <dependency > <groupId > org.mybatis.spring.boot</groupId > <artifactId > mybatis-spring-boot-starter</artifactId > <version > ${mybatis-spring-boot.version}</version > </dependency > </dependencies > <build > <plugins > <plugin > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-maven-plugin</artifactId > </plugin > </plugins > </build > </project >
dubboone-server 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 <?xml version="1.0" encoding="UTF-8"?> <project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion > 4.0.0</modelVersion > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <parent > <groupId > com.dubboOne</groupId > <artifactId > dubboone</artifactId > <version > 0.0.1-SNAPSHOT</version > <relativePath /> </parent > <groupId > com.dubboone.server</groupId > <artifactId > dubboone-server</artifactId > <version > 0.0.1-SNAPSHOT</version > <name > dubboone-server</name > <description > Demo project for Spring Boot</description > <properties > <java.version > 1.8</java.version > <start-class > com.debug.mooc.dubbo.one.server.BootMoreApplication</start-class > <spring-boot.version > 2.0.5.RELEASE</spring-boot.version > <spring-session.version > 1.2.0.RELEASE</spring-session.version > <slf4j.version > 1.7.13</slf4j.version > <log4j.version > 1.2.17</log4j.version > <mysql.version > 5.1.37</mysql.version > <druid.version > 1.0.16</druid.version > <guava.version > 19.0</guava.version > <joda-time.version > 2.9.2</joda-time.version > <cglib.version > 3.1</cglib.version > <zookeeper.version > 3.4.10</zookeeper.version > <curator.version > 2.12.0</curator.version > <resteasy.version > 3.0.7.Final</resteasy.version > <okhttp.version > 3.1.2</okhttp.version > <gson.version > 2.6.1</gson.version > <httpclient.version > 4.3.6</httpclient.version > </properties > <dependencyManagement > <dependencies > <dependency > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-dependencies</artifactId > <version > ${spring-boot.version}</version > <type > pom</type > <scope > import</scope > </dependency > </dependencies > </dependencyManagement > <dependencies > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <dependency > <groupId > com.dubboone.modle</groupId > <artifactId > dubboone-modle</artifactId > <version > 0.0.1-SNAPSHOT</version > </dependency > <dependency > <groupId > org.slf4j</groupId > <artifactId > slf4j-api</artifactId > <version > ${slf4j.version}</version > </dependency > <dependency > <groupId > org.slf4j</groupId > <artifactId > slf4j-log4j12</artifactId > <version > ${slf4j.version}</version > </dependency > <dependency > <groupId > log4j</groupId > <artifactId > log4j</artifactId > <version > ${log4j.version}</version > </dependency > <dependency > <groupId > com.google.guava</groupId > <artifactId > guava</artifactId > <version > ${guava.version}</version > </dependency > <dependency > <groupId > joda-time</groupId > <artifactId > joda-time</artifactId > <version > ${joda-time.version}</version > </dependency > <dependency > <groupId > mysql</groupId > <artifactId > mysql-connector-java</artifactId > <version > ${mysql.version}</version > </dependency > <dependency > <groupId > com.alibaba</groupId > <artifactId > druid</artifactId > <version > ${druid.version}</version > </dependency > <dependency > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-starter-tomcat</artifactId > </dependency > <dependency > <groupId > org.apache.tomcat.embed</groupId > <artifactId > tomcat-embed-jasper</artifactId > </dependency > <dependency > <groupId > javax.servlet</groupId > <artifactId > jstl</artifactId > </dependency > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <dependency > <groupId > com.alibaba.boot</groupId > <artifactId > dubbo-spring-boot-starter</artifactId > <version > 0.2.0</version > <exclusions > <exclusion > <artifactId > curator-framework</artifactId > <groupId > org.apache.curator</groupId > </exclusion > <exclusion > <artifactId > curator-client</artifactId > <groupId > org.apache.curator</groupId > </exclusion > <exclusion > <artifactId > guava</artifactId > <groupId > com.google.guava</groupId > </exclusion > <exclusion > <artifactId > spring-web</artifactId > <groupId > org.springframework</groupId > </exclusion > </exclusions > </dependency > <dependency > <groupId > cglib</groupId > <artifactId > cglib</artifactId > <version > ${cglib.version}</version > <exclusions > <exclusion > <artifactId > asm</artifactId > <groupId > org.ow2.asm</groupId > </exclusion > </exclusions > </dependency > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <dependency > <groupId > org.apache.zookeeper</groupId > <artifactId > zookeeper</artifactId > <version > ${zookeeper.version}</version > <exclusions > <exclusion > <artifactId > slf4j-log4j12</artifactId > <groupId > org.slf4j</groupId > </exclusion > </exclusions > </dependency > <dependency > <groupId > org.apache.curator</groupId > <artifactId > curator-framework</artifactId > <version > ${curator.version}</version > </dependency > //==>⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️ <dependency > <groupId > org.jboss.resteasy</groupId > <artifactId > resteasy-jaxrs</artifactId > <version > ${resteasy.version}</version > <exclusions > <exclusion > <artifactId > httpclient</artifactId > <groupId > org.apache.httpcomponents</groupId > </exclusion > </exclusions > </dependency > <dependency > <groupId > org.jboss.resteasy</groupId > <artifactId > resteasy-netty</artifactId > <version > ${resteasy.version}</version > </dependency > <dependency > <groupId > org.jboss.resteasy</groupId > <artifactId > resteasy-client</artifactId > <version > ${resteasy.version}</version > </dependency > <dependency > <groupId > org.jboss.resteasy</groupId > <artifactId > resteasy-jackson-provider</artifactId > <version > ${resteasy.version}</version > </dependency > <dependency > <groupId > com.google.code.gson</groupId > <artifactId > gson</artifactId > <version > ${gson.version}</version > </dependency > <dependency > <groupId > com.squareup.okhttp3</groupId > <artifactId > okhttp</artifactId > <version > ${okhttp.version}</version > </dependency > </dependencies > <build > <plugins > <plugin > <groupId > org.springframework.boot</groupId > <artifactId > spring-boot-maven-plugin</artifactId > </plugin > </plugins > </build > </project >
2.server :spring-dubbo.xml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 <?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.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> <!--发布出去的dubbo服务类所在包的注解--> <dubbo:annotation package="com.debug.mooc.dubbo.one.server.service.dubbo" /> <!--注册中心zookeeper配置信息--> <dubbo:registry address="${dubbo.registry.address}" /> <!--支持两种协议的调用:rpc-dubbo协议;http协议-rest api-url调用--> <dubbo:protocol name="rest" threads="500" contextpath="v1" server="tomcat" accepts="500"/> <dubbo:protocol name="dubbo" /> <!--消费方信息配置--> <dubbo:application name="dubboOne-consume" owner="debug" organization="dubbox"/> </beans>
##3.server :spring-jdbc.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ="http://www.springframework.org/schema/beans" xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation ="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd " > <bean id ="dataSource" class ="com.alibaba.druid.pool.DruidDataSource" init-method ="init" destroy-method ="close" primary ="true" > <property name ="url" value ="${datasource.url}" /> <property name ="username" value ="${datasource.username}" /> <property name ="password" value ="${datasource.password}" /> <property name ="initialSize" value ="10" /> <property name ="minIdle" value ="10" /> <property name ="maxActive" value ="20" /> <property name ="maxWait" value ="60000" /> <property name ="timeBetweenEvictionRunsMillis" value ="60000" /> <property name ="minEvictableIdleTimeMillis" value ="300000" /> <property name ="validationQuery" value ="SELECT 1 " /> <property name ="testWhileIdle" value ="true" /> <property name ="testOnBorrow" value ="false" /> <property name ="testOnReturn" value ="false" /> <property name ="poolPreparedStatements" value ="true" /> <property name ="maxPoolPreparedStatementPerConnectionSize" value ="20" /> <property name ="filters" value ="stat" /> </bean > <bean id ="transactionManager" class ="org.springframework.jdbc.datasource.DataSourceTransactionManager" > <property name ="dataSource" ref ="dataSource" /> </bean > </beans >
4.application.properties 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #profile #spring.profiles.active=production #spring.profiles.active=local server.port=8093 #server.context-path=/dubboOne server.servlet.context-path=/dubboOne #logging logging.path=E:\\logs\\mooc\\dubboOne\\logs logging.file=dubboOne logging.level.org.springframework = INFO logging.level.com.fasterxml.jackson = INFO logging.level.com.debug.mooc.dubbo.one = debug #json\u5E8F\u5217\u5316\u914D\u7F6E spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.time-zone=GMT+8 #spring.datasource.initialize=false spring.datasource.initialization-mode=never spring.jmx.enabled=false #\u6570\u636E\u6E90\u914D\u7F6E datasource.url=jdbc:mysql://127.0.0.1:3306/mooc_one?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull datasource.username=root datasource.password=linsen #mybatis mybatis.config-location=classpath:mybatis-config.xml mybatis.checkConfigLocation = true mybatis.mapper-locations=classpath:mappers/*.xml #dubbo zookeeper\u914D\u7F6E\u4FE1\u606F dubbo.registry.address=zookeeper://127.0.0.1:2181
5dubbo.properties 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ## # Copyright 1999-2011 Alibaba Group. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ## dubbo.container=log4j,spring dubbo.reference.check=false dubbo.registry.client=curator dubbo.application.name=dubboOne-provider dubbo.application.owner=debug #dubbo\u652F\u6301\u7684dubbo\u534F\u8BAE\u914D\u7F6E dubbo.protocol.name=dubbo dubbo.protocol.dubbo.port=20903 #dubbo\u652F\u6301\u7684http rest api\u7684\u914D\u7F6E dubbo.protocol.name=rest dubbo.protocol.rest.port=9013 dubbo.protocol.rest.server=tomcat dubbo.service.loadbalance=roundrobin
##6.log4j.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #Console Log log4j.rootLogger=INFO,console,debug,info,warn,error LOG_PATTERN=[%d{yyyy-MM-dd HH:mm:ss.SSS}] boot%X{context} - %5p [%t] --- %c{1}: %m%n #A1--Print log to Console log4j.appender.console=org.apache.log4j.ConsoleAppender log4j.appender.console.Threshold=DEBUG log4j.appender.console.layout=org.apache.log4j.PatternLayout log4j.appender.console.layout.ConversionPattern=${LOG_PATTERN} log4j.appender.info=org.apache.log4j.DailyRollingFileAppender log4j.appender.info.Threshold=INFO log4j.appender.info.File=${LOG_PATH}/${LOG_FILE}_info.log log4j.appender.info.DatePattern='.'yyyy-MM-dd log4j.appender.info.layout = org.apache.log4j.PatternLayout log4j.appender.info.layout.ConversionPattern=${LOG_PATTERN} log4j.appender.error=org.apache.log4j.DailyRollingFileAppender log4j.appender.error.Threshold=ERROR log4j.appender.error.File=${LOG_PATH}/${LOG_FILE}_error.log log4j.appender.error.DatePattern='.'yyyy-MM-dd log4j.appender.error.layout = org.apache.log4j.PatternLayout log4j.appender.error.layout.ConversionPattern=${LOG_PATTERN} log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender log4j.appender.debug.Threshold=DEBUG log4j.appender.debug.File=${LOG_PATH}/${LOG_FILE}_debug.log log4j.appender.debug.DatePattern='.'yyyy-MM-dd log4j.appender.debug.layout = org.apache.log4j.PatternLayout log4j.appender.debug.layout.ConversionPattern=${LOG_PATTERN} log4j.appender.warn=org.apache.log4j.DailyRollingFileAppender log4j.appender.warn.Threshold=WARN log4j.appender.warn.File=${LOG_PATH}/${LOG_FILE}_warn.log log4j.appender.warn.DatePattern='.'yyyy-MM-dd log4j.appender.warn.layout = org.apache.log4j.PatternLayout log4j.appender.warn.layout.ConversionPattern=${LOG_PATTERN}
##7.mybatis-config.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration > <settings > <setting name ="cacheEnabled" value ="true" /> <setting name ="defaultStatementTimeout" value ="3000" /> <setting name ="mapUnderscoreToCamelCase" value ="true" /> <setting name ="useGeneratedKeys" value ="true" /> </settings > <plugins > <plugin interceptor ="com.github.pagehelper.PageHelper" > <property name ="dialect" value ="mysql" /> <property name ="offsetAsPageNum" value ="true" /> <property name ="rowBoundsWithCount" value ="true" /> <property name ="pageSizeZero" value ="true" /> <property name ="reasonable" value ="false" /> <property name ="supportMethodsArguments" value ="false" /> <property name ="returnPageInfo" value ="none" /> </plugin > </plugins > </configuration >
3.整合Dubbo和Zookeeper
1 2 3 4 5 application.properties: dubbo.registry.address=zookeeper://127.0.0.1:2181、 #server.context-path=/dubboOne server.servlet.context-path=/dubboOne
1 2 3 4 5 6 7 8 9 10 11 12 13 14 dubbo.properties dubbo.container=log4j,spring dubbo.reference.check=false dubbo.registry.client=curator dubbo.application.name=dubboOne-provider dubbo.application.owner=debug #dubbo\u652F\u6301\u7684dubbo\u534F\u8BAE\u914D\u7F6E dubbo.protocol.name=dubbo dubbo.protocol.dubbo.port=20903 #dubbo\u652F\u6301\u7684http rest api\u7684\u914D\u7F6E dubbo.protocol.name=rest dubbo.protocol.rest.port=9013 dubbo.protocol.rest.server=tomcat dubbo.service.loadbalance=roundrobin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 spring-dubbo <?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.xsd http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd" > <dubbo:annotation package ="com.debug.mooc.dubbo.one.server.service.dubbo" /> <dubbo:registry address ="${dubbo.registry.address}" /> <dubbo:protocol name ="rest" threads ="500" contextpath ="v1" server ="tomcat" accepts ="500" /> <dubbo:protocol name ="dubbo" /> <dubbo:application name ="dubboOne-consume" owner ="debug" organization ="dubbox" /> </beans >
4 zookeeper的安装
Author:
John Doe
Permalink:
http://yoursite.com/2019/03/12/Dubbo/Dubbo慕课网/
License:
Copyright (c) 2019 CC-BY-NC-4.0 LICENSE
Slogan:
Do you believe in DESTINY?