H__D  

环境准备

  准备一个SpringCloud  Config配置中心,参考:【SpringCloud】Spring Cloud Config 配置中心(二十) - H__D - 博客园

步骤

1、启动Config服务,并在Config服务器中,新增cas-server.properties文件

  文件内容,我就修改了端口

server.context-path=/cas
server.port=8442

 

  

2、复制bootstrap.properties文件

  在编译运行后的target目录中,找到bootstrap.properties文件,复制到 resources目录中

  

3、启动cas服务

  可以看到启动输入日志中,有从config服务中获取配置 cas-server.properties

  

 4、使用浏览器访问

  地址:https://localhost:8442/cas

  可以看到配置已生效

  

 

posted on   H__D  阅读(8)  评论(0编辑  收藏  举报
 
点击右上角即可分享
微信分享提示