6.6. 设置 Hot Rod 客户端属性
使用 Hot Rod 客户端配置属性指定 Data Grid 主机名和端口、身份验证详情和 TLS 证书。
流程
-
创建一个
hotrod-client.properties文件,其中包含您的 Hot Rod 客户端配置。 -
将
hotrod-client.properties添加到 classpath 中。
6.6.1. OpenShift 上的热备份配置属性 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
在 OpenShift 上运行的 Hot Rod 客户端的配置属性:
# Connection
infinispan.client.hotrod.server_list=${APPLICATION_NAME}.${SERVICE_NAMESPACE}.svc:11222
# Authentication
infinispan.client.hotrod.use_auth=true
infinispan.client.hotrod.auth_username=${USERNAME}
infinispan.client.hotrod.auth_password=${PASSWORD}
infinispan.client.hotrod.auth_server_name=${APPLICATION_NAME}
infinispan.client.hotrod.sasl_mechanism=DIGEST-MD5
infinispan.client.hotrod.sasl_properties.javax.security.sasl.qop=auth
# Encryption
infinispan.client.hotrod.trust_store_path=/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt