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/