虚拟机部署、容器化部署选择其中一种方式即可。
spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml 和 spring-cloud-tencent-examples/polaris-discovery-example/discovery-caller-service/src/main/resources/bootstrap.yml两个文件。spring-cloud-tencent-examples/polaris-discovery-example/discovery-callee-service/src/main/resources/bootstrap.yml为例)。server:port: 0spring:application:name: DiscoveryCallerServicecloud:polaris:enabled: trueaddress: grpc://{北极星引擎内网地址 IP}:8091
polaris-discovery-example 源码根目录下,打开 cmd 命令,执行 mvn clean package 命令,对项目进行打包编译。软件包所在目录 | 软件包名称 | 说明 |
polaris-discovery-example/discovery-callee-service/target | discovery-callee-service-${version}-SNAPSHOT.jar | 服务生产者 |
polaris-discovery-example/discovery-caller-service/target | discovery-caller-service-${version}-SNAPSHOT.jar | 服务消费者 |
nohup java -Djava.security.egd=file:/dev/./urandom -jar [jar包名称] &
FROM java:8ADD ddiscovery-caller-service-${version}-SNAPSHOT.jar /root/app.jarENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/root/app.jar"]

curl -L -X GET 'http://${add.address}:${app.port}/echo?value="hello-world'预期返回值:hello-world
文档反馈