zuul开启https

 springboot项目jar包方式启动通用

 

  1.证书放入资源文件夹

  

 

   2.server 添加 ssl配置

  

       踩坑点: key-store: classpath后面的冒号需要紧跟着classpath,不能有空格。

 

spring:
  application:
    name: zuul
#注册到eureka
eureka:
  instance:
    lease-expiration-duration-in-seconds: 30
    lease-renewal-interval-in-seconds: 10
    prefer-ip-address: true
    instance-id: dragon
  client:
    fetch-registry: true
    register-with-eureka: true
    service-url:
      defaultZone: http://localhost:7001/eureka/
server:
  port: 443
#  ssl证书相关配置
  ssl:
    key-store: classpath:https/1538502410793.pfx
    key-store-password: 1538502410793
    key-store-type: PKCS12
#zuul的相关配置
zuul:
  routes:
#    需要配置路由的微服务
    consumer:
      serviceId: eureka-consumer
      path: /con/**
#      无法使用服务名称访问
  ignored-services: "*"
#  访问前添加前缀
  prefix: /fengyuntec/

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值