加入服务发现功能,依赖SYSAPI服务名而非固定ip
This commit is contained in:
@@ -2,8 +2,10 @@ package com.gzzn.omms.adminapi;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableEurekaClient
|
||||
public class AdminApiApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -36,11 +36,18 @@ spring:
|
||||
test-on-return: true
|
||||
pool-prepared-statements: false
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://130.120.3.231:94/eureka/
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
sysApi:
|
||||
host: 130.120.3.231
|
||||
port: 93
|
||||
schema: http
|
||||
baseUrl: ${sysApi.schema}://${sysApi.host}:${sysApi.port}
|
||||
#baseUrl: ${sysApi.schema}://${sysApi.host}:${sysApi.port}
|
||||
baseUrl: ${sysApi.schema}://SYSAPI
|
||||
getOpLogSwitchByLevleAndNameUrl: ${sysApi.baseUrl}/oplog/getOpLogSwitch/{level}/{name}
|
||||
|
||||
logstash:
|
||||
|
||||
@@ -36,11 +36,18 @@ spring:
|
||||
test-on-return: true
|
||||
pool-prepared-statements: false
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
eureka:
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://130.120.3.231:94/eureka/
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
sysApi:
|
||||
host: 172.17.35.163
|
||||
port: 93
|
||||
schema: http
|
||||
baseUrl: ${sysApi.schema}://${sysApi.host}:${sysApi.port}
|
||||
#baseUrl: ${sysApi.schema}://${sysApi.host}:${sysApi.port}
|
||||
baseUrl: ${sysApi.schema}://SYSAPI
|
||||
getOpLogSwitchByLevleAndNameUrl: ${sysApi.baseUrl}/oplog/getOpLogSwitch/{level}/{name}
|
||||
|
||||
logstash:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
spring:
|
||||
application:
|
||||
name: adminapi
|
||||
profiles:
|
||||
active: dev
|
||||
jpa:
|
||||
|
||||
Reference in New Issue
Block a user