添加eureka注册中心支持
This commit is contained in:
@@ -2,7 +2,9 @@ package com.macro.mall.search;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class MallSearchApplication {
|
||||
|
||||
|
||||
@@ -16,4 +16,10 @@ spring:
|
||||
elasticsearch:
|
||||
repositories:
|
||||
enabled: true
|
||||
cluster-nodes: 127.0.0.1:9300
|
||||
cluster-nodes: 127.0.0.1:9300
|
||||
eureka:
|
||||
client:
|
||||
register-with-eureka: true
|
||||
fetch-registry: true
|
||||
service-url:
|
||||
defaultZone: http://localhost:8001/eureka/
|
||||
@@ -1,6 +1,8 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: dev #默认为开发环境
|
||||
application:
|
||||
name: mall-search
|
||||
|
||||
server:
|
||||
port: 8081
|
||||
|
||||
Reference in New Issue
Block a user