SPU.get接口改造
parent
30e2d08784
commit
c50f99e7b3
|
@ -44,7 +44,7 @@ spring:
|
||||||
url: jdbc:mysql://s1.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 请修改成你本地的 MySQL url
|
url: jdbc:mysql://s1.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 请修改成你本地的 MySQL url
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root # 请修改成你本地的 MySQL username
|
username: root # 请修改成你本地的 MySQL username
|
||||||
password: 3WLiVUBEwTbvAfsh # 请修改成你本地的 MySQL password
|
password: zhuyang # 请修改成你本地的 MySQL password
|
||||||
```
|
```
|
||||||
|
|
||||||
# 4. Zookeeper
|
# 4. Zookeeper
|
||||||
|
|
|
@ -106,6 +106,11 @@
|
||||||
<artifactId>mapstruct-jdk8</artifactId>
|
<artifactId>mapstruct-jdk8</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -2,8 +2,12 @@ package cn.iocoder.mall.managementweb;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
@EnableDiscoveryClient
|
||||||
|
@EnableFeignClients
|
||||||
public class ManagementWebApplication {
|
public class ManagementWebApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -49,3 +49,11 @@ id=59&name=测试商品标题&description=测试商品描述&cid=637&sellPoint=
|
||||||
&skus[1].price=2&skus[1].quantity=50&skus[1].attrValueIds=2,4
|
&skus[1].price=2&skus[1].quantity=50&skus[1].attrValueIds=2,4
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
### /product-spu/get
|
||||||
|
GET http://127.0.0.1:18083/management-api/product-spu/get?productSpuId=32
|
||||||
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
Authorization:Bearer yudaoyuanma
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
package cn.iocoder.mall.managementweb.feign;
|
||||||
|
|
||||||
|
import cn.iocoder.common.framework.vo.CommonResult;
|
||||||
|
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
@FeignClient(value = "product-service")
|
||||||
|
public interface ProductSpuFeign {
|
||||||
|
/**
|
||||||
|
* 获得商品 SPU
|
||||||
|
*
|
||||||
|
* @param productSpuId 商品 SPU 编号
|
||||||
|
* @return 商品 SPU
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/product/spu/get")
|
||||||
|
CommonResult<ProductSpuRespDTO> getProductSpu(@RequestParam("productSpuId") Integer productSpuId);
|
||||||
|
|
||||||
|
}
|
|
@ -7,9 +7,11 @@ import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuPageReq
|
||||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuRespVO;
|
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuRespVO;
|
||||||
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuUpdateReqVO;
|
import cn.iocoder.mall.managementweb.controller.product.vo.spu.ProductSpuUpdateReqVO;
|
||||||
import cn.iocoder.mall.managementweb.convert.product.ProductSpuConvert;
|
import cn.iocoder.mall.managementweb.convert.product.ProductSpuConvert;
|
||||||
|
import cn.iocoder.mall.managementweb.feign.ProductSpuFeign;
|
||||||
import cn.iocoder.mall.productservice.rpc.spu.ProductSpuRpc;
|
import cn.iocoder.mall.productservice.rpc.spu.ProductSpuRpc;
|
||||||
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
||||||
import org.apache.dubbo.config.annotation.DubboReference;
|
import org.apache.dubbo.config.annotation.DubboReference;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -23,6 +25,9 @@ public class ProductSpuManager {
|
||||||
@DubboReference(version = "${dubbo.consumer.ProductSpuRpc.version}")
|
@DubboReference(version = "${dubbo.consumer.ProductSpuRpc.version}")
|
||||||
private ProductSpuRpc productSpuRpc;
|
private ProductSpuRpc productSpuRpc;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ProductSpuFeign productSpuFeign;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建商品 SPU
|
* 创建商品 SPU
|
||||||
*
|
*
|
||||||
|
@ -52,7 +57,7 @@ public class ProductSpuManager {
|
||||||
* @return 商品 SPU
|
* @return 商品 SPU
|
||||||
*/
|
*/
|
||||||
public ProductSpuRespVO getProductSpu(Integer productSpuId) {
|
public ProductSpuRespVO getProductSpu(Integer productSpuId) {
|
||||||
CommonResult<ProductSpuRespDTO> getProductSpuResult = productSpuRpc.getProductSpu(productSpuId);
|
CommonResult<ProductSpuRespDTO> getProductSpuResult = productSpuFeign.getProductSpu(productSpuId);
|
||||||
getProductSpuResult.checkError();
|
getProductSpuResult.checkError();
|
||||||
return ProductSpuConvert.INSTANCE.convert(getProductSpuResult.getData());
|
return ProductSpuConvert.INSTANCE.convert(getProductSpuResult.getData());
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,15 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
||||||
# Mall 认证安全配置
|
# Mall 认证安全配置
|
||||||
mall.security.admin.demo: true # 是否开启演示模式
|
mall.security.admin.demo: true # 是否开启演示模式
|
||||||
|
|
|
@ -4,12 +4,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -4,7 +4,7 @@ spring:
|
||||||
url: jdbc:mysql://s1.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
url: jdbc:mysql://s1.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
|
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
|
|
|
@ -4,7 +4,7 @@ spring:
|
||||||
url: jdbc:mysql://s1.iocoder.cn:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
url: jdbc:mysql://s1.iocoder.cn:3306/mall_admin?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
|
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
||||||
# XXL-Job 配置项
|
# XXL-Job 配置项
|
||||||
xxl:
|
xxl:
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_pay?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
@ -28,7 +28,7 @@ xxl:
|
||||||
job:
|
job:
|
||||||
enabled: false # 本地开发时,关闭 XXL-Job
|
enabled: false # 本地开发时,关闭 XXL-Job
|
||||||
admin:
|
admin:
|
||||||
addresses: http://400-infra.server.iocoder.cn:9099
|
addresses: http://localhost:9099
|
||||||
executor:
|
executor:
|
||||||
appname: ${spring.application.name}
|
appname: ${spring.application.name}
|
||||||
accessToken:
|
accessToken:
|
||||||
|
|
|
@ -46,7 +46,7 @@ dubbo:
|
||||||
|
|
||||||
# RocketMQ 配置项
|
# RocketMQ 配置项
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 400-infra.server.iocoder.cn:9876
|
name-server: localhost:9876
|
||||||
producer:
|
producer:
|
||||||
group: ${spring.application.name}-producer-group
|
group: ${spring.application.name}-producer-group
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class DubboGenericInvokerTest {
|
||||||
application.setName("api-generic-consumer");
|
application.setName("api-generic-consumer");
|
||||||
|
|
||||||
RegistryConfig registry = new RegistryConfig();
|
RegistryConfig registry = new RegistryConfig();
|
||||||
registry.setAddress("nacos://400-infra.server.iocoder.cn:8848?namespace=dev");
|
registry.setAddress("nacos://localhost:8848?namespace=dev");
|
||||||
|
|
||||||
application.setRegistry(registry);
|
application.setRegistry(registry);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.cloud</groupId>
|
||||||
|
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||||
|
<version>RELEASE</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -102,6 +102,10 @@
|
||||||
<artifactId>aspectjweaver</artifactId>
|
<artifactId>aspectjweaver</artifactId>
|
||||||
<version>1.9.6</version>
|
<version>1.9.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-annotations</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -2,8 +2,12 @@ package cn.iocoder.mall.productservice;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||||
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
@EnableDiscoveryClient
|
||||||
|
@EnableFeignClients
|
||||||
public class ProductServiceApplication {
|
public class ProductServiceApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
### /product/spu/get 获得商品 SPU
|
||||||
|
GET http://localhost:38082/product/spu/get?productSpuId=32
|
||||||
|
###
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package cn.iocoder.mall.productservice.controller;
|
||||||
|
|
||||||
|
import cn.iocoder.common.framework.vo.CommonResult;
|
||||||
|
import cn.iocoder.mall.productservice.manager.spu.ProductSpuManager;
|
||||||
|
import cn.iocoder.mall.productservice.rpc.spu.dto.ProductSpuRespDTO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import static cn.iocoder.common.framework.vo.CommonResult.success;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/spu")
|
||||||
|
@Api("商品spu")
|
||||||
|
public class SpuController {
|
||||||
|
@Autowired
|
||||||
|
private ProductSpuManager productSpuManager;
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@ApiOperation("获得商品 SPU")
|
||||||
|
@ApiImplicitParam(name = "productSpuId", value = "商品 SPU 编号", required = true)
|
||||||
|
public CommonResult<ProductSpuRespDTO> getProductSpu(@RequestParam(value="productSpuId") Integer productSpuId) {
|
||||||
|
return success(productSpuManager.getProductSpu(productSpuId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,21 +1,21 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_product?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
|
@ -42,7 +42,7 @@ dubbo:
|
||||||
|
|
||||||
# RocketMQ 配置项
|
# RocketMQ 配置项
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 400-infra.server.iocoder.cn:9876
|
name-server: localhost:9876
|
||||||
producer:
|
producer:
|
||||||
group: ${spring.application.name}-producer-group
|
group: ${spring.application.name}-producer-group
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_promotion?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
|
@ -46,7 +46,7 @@ dubbo:
|
||||||
|
|
||||||
# RocketMQ 配置项
|
# RocketMQ 配置项
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 400-infra.server.iocoder.cn:9876
|
name-server: localhost:9876
|
||||||
producer:
|
producer:
|
||||||
group: ${spring.application.name}-producer-group
|
group: ${spring.application.name}-producer-group
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -4,15 +4,15 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
|
@ -9,12 +9,12 @@ spring:
|
||||||
data:
|
data:
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
cluster-name: elasticsearch
|
cluster-name: elasticsearch
|
||||||
cluster-nodes: 400-infra.server.iocoder.cn:9300
|
cluster-nodes: localhost:9300
|
||||||
repositories:
|
repositories:
|
||||||
enable: true
|
enable: true
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
rest:
|
rest:
|
||||||
uris: 400-infra.server.iocoder.cn:9200
|
uris: localhost:9200
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
|
@ -46,7 +46,7 @@ dubbo:
|
||||||
|
|
||||||
# RocketMQ 配置项
|
# RocketMQ 配置项
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 400-infra.server.iocoder.cn:9876
|
name-server: localhost:9876
|
||||||
|
|
||||||
# Actuator 监控配置项
|
# Actuator 监控配置项
|
||||||
management:
|
management:
|
||||||
|
|
|
@ -4,12 +4,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -4,7 +4,7 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
# Spring 主应用配置
|
# Spring 主应用配置
|
||||||
main:
|
main:
|
||||||
|
@ -14,5 +14,5 @@ spring:
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
spring:
|
spring:
|
||||||
# MySQL 配置项
|
# MySQL 配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
|
|
||||||
# Redis 配置
|
# Redis 配置
|
||||||
redis:
|
redis:
|
||||||
host: 400-infra.server.iocoder.cn
|
host: localhost
|
||||||
port: 6379
|
port: 6379
|
||||||
database: 0
|
database: 0
|
||||||
|
|
||||||
|
@ -17,12 +17,12 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
spring:
|
spring:
|
||||||
# MySQL 配置项
|
# MySQL 配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_system?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
|
|
||||||
# Redis 配置
|
# Redis 配置
|
||||||
redis:
|
redis:
|
||||||
host: 400-infra.server.iocoder.cn
|
host: localhost
|
||||||
port: 6379
|
port: 6379
|
||||||
database: 0
|
database: 0
|
||||||
|
|
||||||
|
@ -17,15 +17,15 @@ spring:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_trade?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_trade?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_trade?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_trade?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
# # Spring 主应用配置
|
# # Spring 主应用配置
|
||||||
# main:
|
# main:
|
||||||
|
@ -20,8 +20,8 @@ spring:
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
|
@ -52,7 +52,7 @@ dubbo:
|
||||||
|
|
||||||
# RocketMQ 配置项
|
# RocketMQ 配置项
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 400-infra.server.iocoder.cn:9876
|
name-server: localhost:9876
|
||||||
producer:
|
producer:
|
||||||
group: ${spring.application.name}-producer-group
|
group: ${spring.application.name}-producer-group
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
spring:
|
spring:
|
||||||
# 数据源配置项
|
# 数据源配置项
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://400-infra.server.iocoder.cn:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
url: jdbc:mysql://localhost:3306/mall_user?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=CTT
|
||||||
driver-class-name: com.mysql.jdbc.Driver
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
username: root
|
username: root
|
||||||
password: 3WLiVUBEwTbvAfsh
|
password: zhuyang
|
||||||
# Spring Cloud 配置项
|
# Spring Cloud 配置项
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
# Spring Cloud Nacos Discovery 配置项
|
# Spring Cloud Nacos Discovery 配置项
|
||||||
discovery:
|
discovery:
|
||||||
server-addr: 400-infra.server.iocoder.cn:8848 # Nacos 服务器地址
|
server-addr: localhost:8848 # Nacos 服务器地址
|
||||||
namespace: dev # Nacos 命名空间
|
namespace: dev # Nacos 命名空间
|
||||||
|
|
||||||
# Dubbo 配置项
|
# Dubbo 配置项
|
||||||
dubbo:
|
dubbo:
|
||||||
# Dubbo 注册中心
|
# Dubbo 注册中心
|
||||||
registry:
|
registry:
|
||||||
# address: spring-cloud://400-infra.server.iocoder.cn:8848 # 指定 Dubbo 服务注册中心的地址
|
# address: spring-cloud://localhost:8848 # 指定 Dubbo 服务注册中心的地址
|
||||||
address: nacos://400-infra.server.iocoder.cn:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
address: nacos://localhost:8848?namespace=dev # 指定 Dubbo 服务注册中心的地址
|
||||||
# Dubbo 服务提供者的配置
|
# Dubbo 服务提供者的配置
|
||||||
provider:
|
provider:
|
||||||
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
tag: ${DUBBO_TAG} # Dubbo 路由分组
|
||||||
|
|
Loading…
Reference in New Issue