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