*****配置服务器 - 应用程序服务设置*****
以下是application.yml
的配置V [libjvm.so+0x2816c5] EventsRuntime::fire_gc_start_end(signed char, signed char, GCCause::Cause, bool)+0x125
V [libjvm.so+0x27b72d] EventsGCRuntime::fire_gc_start(signed char, GCCause::Cause)+0x7d
V [libjvm.so+0x91ea35] G1CollectedHeap::do_collection(bool, bool, unsigned long)+0x1195
V [libjvm.so+0x1200534] VM_G1CollectFull::doit()+0xa4
V [libjvm.so+0x11fed83] VM_Operation::evaluate()+0xb3
V [libjvm.so+0x11fc1d8] VMThread::evaluate_operation(VM_Operation*)+0x448
V [libjvm.so+0x11fca33] VMThread::loop()+0x263
V [libjvm.so+0x11fd000] VMThread::run()+0xe0
V [libjvm.so+0xef2662] java_start(Thread*)+0xf2
以下是来自boostrap.yml的配置
server:
port: 8882
eureka:
client:
serviceUrl:
defaultZone: http://localhost:8761/eureka/
spring:
cloud:
config:
server:
git:uri: https://github.com/appleman/config
这个普通的春季启动应用程序启动会将config-server注册到Eureka。
** General Eureka Server正在8761端口上运行
********以下是应用程序客户端配置*****
以下是我的bootstrap.yml中的Application Client配置
spring:
application:
name: configserver
在Spring Controller中注入属性,如下面的代码段不起作用。
spring:
application:
name: contractService,envDEV13
cloud:
config:
enabled: true
discovery:
enabled: true
serviceId: configserver
eureka:
instance:
nonSecurePort: ${server.port:8080}
client:
serviceUrl:
defaultZone: http://${eureka.host:localhost}:${eureka.port:8761}/eureka/
如果我们做错了,请建议我们。