假设我通过XPath找到了一个元素:
WebElement we = driver.findElement(By.xpath("some XPath"));
我知道我可以获得特定CSS属性we.getCssValue("some property")的值,但是我可以获得所有属性的值而不必明确提及它们的名称吗?
我将 Spring Cloud Stream 与Aiven的架构注册表一起使用,后者使用Confluence 的架构注册表。Aiven 的架构注册表受密码保护。根据这些说明,需要设置这两个配置参数才能成功访问架构注册表服务器。
props.put("basic.auth.credentials.source", "USER_INFO");
props.put("basic.auth.user.info", "avnadmin:schema-reg-password");
Run Code Online (Sandbox Code Playgroud)
当我只使用vanilla java的kafka驱动程序时一切都很好,但是如果我使用Spring云流,我不知道如何注入这两个参数。目前,我正在将"basic.auth.user.info"和"basic.auth.credentials.source"放入文件"spring.cloud.stream.kafka.binder.configuration"中application.yml。
这样做,我就进入"401 Unauthorized"了模式想要注册的线路。
更新1:
根据 Ali n 的建议,我更新了 SchemaRegistryClient 的 bean 的配置方式,以便它能够识别 SSL 上下文。
@Bean
public SchemaRegistryClient schemaRegistryClient(
@Value("${spring.cloud.stream.schemaRegistryClient.endpoint}") String endpoint) {
try {
final KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream(
new File("path/to/client.keystore.p12")),
"secret".toCharArray());
final KeyStore trustStore = KeyStore.getInstance("JKS");
trustStore.load(new FileInputStream(
new File("path/to/client.truststore.jks")),
"secret".toCharArray());
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> …Run Code Online (Sandbox Code Playgroud) avro apache-kafka spring-cloud-stream confluent-schema-registry aiven
想象一个这样的秘密:
apiVersion: v1
kind: Secret
metadata:
name: {{ include "test-cicd.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "test-cicd.name" . }}
helm.sh/chart: {{ include "test-cicd.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
secret.yaml: |
{{ if eq .Values.env "prod" }}
foo: bar-prod
foo2: bar2_prod
{{ else if eq .Values.evn "dev" }}
foo: bar-dev
{{ end }}
Run Code Online (Sandbox Code Playgroud)
是否可以使用Kubeseal进行密封?现在这样做,我得到invalid map key: map[interface {}]interface {}{"include \"test-cicd.fullname\" .":interface {}(nil)}这可能是因为它不是“有效”的 yaml 文件。
我尝试过的一件事是:1. 移除 helm 模板行 2. …
aiven ×1
apache-kafka ×1
avro ×1
css ×1
java ×1
javascript ×1
kubernetes ×1
selenium ×1
xpath ×1