mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Merge pull request #2015 from tangyuewei/master
Some spaces are removed, which is more in line with the specification
This commit is contained in:
commit
28d2100f5c
@ -18,18 +18,18 @@ spring.cloud.nacos.password=nacos
|
|||||||
#spring.cloud.nacos.config.shared-data-ids=common.properties,base-common.properties
|
#spring.cloud.nacos.config.shared-data-ids=common.properties,base-common.properties
|
||||||
|
|
||||||
## recommended.
|
## recommended.
|
||||||
spring.cloud.nacos.config.shared-configs[0].data-id= test2.yaml
|
spring.cloud.nacos.config.shared-configs[0].data-id=test2.yaml
|
||||||
spring.cloud.nacos.config.shared-configs[0].refresh=true
|
spring.cloud.nacos.config.shared-configs[0].refresh=true
|
||||||
## the default value is 'DEFAULT_GROUP' , if not specified.
|
## the default value is 'DEFAULT_GROUP' , if not specified.
|
||||||
spring.cloud.nacos.config.shared-configs[0].group= GROUP_APP1
|
spring.cloud.nacos.config.shared-configs[0].group=GROUP_APP1
|
||||||
|
|
||||||
## not recommended.
|
## not recommended.
|
||||||
#spring.cloud.nacos.config.ext-config[0]=ext.properties
|
#spring.cloud.nacos.config.ext-config[0]=ext.properties
|
||||||
## recommended.
|
## recommended.
|
||||||
spring.cloud.nacos.config.extension-configs[0].data-id= extension1.properties
|
spring.cloud.nacos.config.extension-configs[0].data-id=extension1.properties
|
||||||
spring.cloud.nacos.config.extension-configs[0].refresh=true
|
spring.cloud.nacos.config.extension-configs[0].refresh=true
|
||||||
spring.cloud.nacos.config.extension-configs[1].data-id= test1.yml
|
spring.cloud.nacos.config.extension-configs[1].data-id=test1.yml
|
||||||
spring.cloud.nacos.config.extension-configs[1].refresh= true
|
spring.cloud.nacos.config.extension-configs[1].refresh=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ Provider端在application.properties文件中定义dubbo相关的配置,比如
|
|||||||
|
|
||||||
定义具体的服务:
|
定义具体的服务:
|
||||||
|
|
||||||
@Service(
|
@DubboService(
|
||||||
version = "${foo.service.version}",
|
version = "${foo.service.version}",
|
||||||
application = "${dubbo.application.id}",
|
application = "${dubbo.application.id}",
|
||||||
protocol = "${dubbo.protocol.id}",
|
protocol = "${dubbo.protocol.id}",
|
||||||
@ -111,7 +111,7 @@ Consumer端在服务调用之前,先定义限流规则。
|
|||||||
|
|
||||||
根据Provider端中发布的定义,使用Dubbo的@Reference注解注入服务对应的Bean:
|
根据Provider端中发布的定义,使用Dubbo的@Reference注解注入服务对应的Bean:
|
||||||
|
|
||||||
@Reference(version = "${foo.service.version}", application = "${dubbo.application.id}",
|
@DubboReference(version = "${foo.service.version}", application = "${dubbo.application.id}",
|
||||||
path = "dubbo://localhost:12345", timeout = 30000)
|
path = "dubbo://localhost:12345", timeout = 30000)
|
||||||
private FooService fooService;
|
private FooService fooService;
|
||||||
|
|
||||||
|
@ -16,14 +16,14 @@
|
|||||||
|
|
||||||
package com.alibaba.cloud.examples;
|
package com.alibaba.cloud.examples;
|
||||||
|
|
||||||
import org.apache.dubbo.config.annotation.Reference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fangjian
|
* @author fangjian
|
||||||
*/
|
*/
|
||||||
public class FooServiceConsumer {
|
public class FooServiceConsumer {
|
||||||
|
|
||||||
@Reference(version = "${foo.service.version}",
|
@DubboReference(version = "${foo.service.version}",
|
||||||
application = "${dubbo.application.id}",
|
application = "${dubbo.application.id}",
|
||||||
url = "dubbo://localhost:12345?version=1.0.0", timeout = 30000)
|
url = "dubbo://localhost:12345?version=1.0.0", timeout = 30000)
|
||||||
private FooService fooService;
|
private FooService fooService;
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
package com.alibaba.cloud.examples;
|
package com.alibaba.cloud.examples;
|
||||||
|
|
||||||
import org.apache.dubbo.config.annotation.Service;
|
import org.apache.dubbo.config.annotation.DubboService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author fangjian
|
* @author fangjian
|
||||||
*/
|
*/
|
||||||
@Service(version = "${foo.service.version}", application = "${dubbo.application.id}",
|
@DubboService(version = "${foo.service.version}", application = "${dubbo.application.id}",
|
||||||
protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}")
|
protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}")
|
||||||
public class FooServiceImpl implements FooService {
|
public class FooServiceImpl implements FooService {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user