From 1cbdb8f04d5ad6667ffe2e1704930749d83eeae2 Mon Sep 17 00:00:00 2001 From: yh <1844516659@qq.com> Date: Tue, 19 Jul 2022 17:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=9E=E6=BB=B4=E5=87=BA=E8=A1=8C=E7=BD=91?= =?UTF-8?q?=E7=BA=A6=E8=BD=A62022-=E5=B0=86service-driver-user=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=B3=A8=E5=86=8C=E5=88=B0Nacos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../servicedriveruser/ServiceDriverUserApplication.java | 2 ++ service-driver-user/src/main/resources/application.yml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/service-driver-user/src/main/java/com/mashibing/servicedriveruser/ServiceDriverUserApplication.java b/service-driver-user/src/main/java/com/mashibing/servicedriveruser/ServiceDriverUserApplication.java index 73bcee9..576ba00 100644 --- a/service-driver-user/src/main/java/com/mashibing/servicedriveruser/ServiceDriverUserApplication.java +++ b/service-driver-user/src/main/java/com/mashibing/servicedriveruser/ServiceDriverUserApplication.java @@ -3,7 +3,9 @@ package com.mashibing.servicedriveruser; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +@EnableDiscoveryClient @SpringBootApplication @MapperScan("com.mashibing.servicedriveruser.mapper") public class ServiceDriverUserApplication { diff --git a/service-driver-user/src/main/resources/application.yml b/service-driver-user/src/main/resources/application.yml index c1e5ca6..23b5290 100644 --- a/service-driver-user/src/main/resources/application.yml +++ b/service-driver-user/src/main/resources/application.yml @@ -3,10 +3,10 @@ server: spring: application: name: service-driver-user -# cloud: -# nacos: -# discovery: -# server-addr: 127.0.0.1:8848 + cloud: + nacos: + discovery: + server-addr: 127.0.0.1:8848 datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/service-driver-user?characterEncoding=utf-8&serverTimezone=GMT%2B8