乘客服务注册到nacos

master
kezhen0805 2 years ago
parent 56d6d4b3cd
commit 81b7f6530f

@ -16,6 +16,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<version>2021.1</version>
</dependency>
</dependencies>
<properties>

@ -2,6 +2,7 @@ package com.mashibing.apipassenger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
/**
* @author kezhen
@ -9,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* @description
*/
@SpringBootApplication
@EnableDiscoveryClient
public class ApiPassengerApplication {
public static void main(String[] args) {
SpringApplication.run(ApiPassengerApplication.class);

@ -1,2 +1,11 @@
server:
port: 8081
port: 8081
spring:
application:
name: api-passenger
cloud:
nacos:
discovery:
server-addr: 127.0.0.1:8848

Loading…
Cancel
Save