export $CAMEL_VAULT_HASHICORP_TOKEN=token
export $CAMEL_VAULT_HASHICORP_HOST=host
export $CAMEL_VAULT_HASHICORP_PORT=port
export $CAMEL_VAULT_HASHICORP_SCHEME=http/https
export $CAMEL_VAULT_HASHICORP_TOKEN=token
export $CAMEL_VAULT_HASHICORP_HOST=host
export $CAMEL_VAULT_HASHICORP_PORT=port
export $CAMEL_VAULT_HASHICORP_SCHEME=http/https
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
camel.vault.hashicorp.token = token
camel.vault.hashicorp.host = host
camel.vault.hashicorp.port = port
camel.vault.hashicorp.scheme = scheme
camel.vault.hashicorp.token = token
camel.vault.hashicorp.host = host
camel.vault.hashicorp.port = port
camel.vault.hashicorp.scheme = scheme
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route:default}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route:default}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
{
"username": "admin",
"password": "password123",
"engine": "postgres",
"host": "127.0.0.1",
"port": "3128",
"dbname": "db"
}
{
"username": "admin",
"password": "password123",
"engine": "postgres",
"host": "127.0.0.1",
"port": "3128",
"dbname": "db"
}
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username:admin}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username:admin}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
在这种情况下,如果 secret 不存在或者 secret 存在(在 'secret' 引擎中),但 username 字段不是 secret 的一部分,则属性将回退到 "admin" 作为值。
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route@2}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:secret:route@2}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:route:default@2}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<to uri="{{hashicorp:route:default@2}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username:admin@2}}"/>
</route>
</camelContext>
<camelContext>
<route>
<from uri="direct:start"/>
<log message="Username is {{hashicorp:secret:database/username:admin@2}}"/>
</route>
</camelContext>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
如果 secret 不存在或者版本不存在,此方法将返回数据库 secret 的用户名字段,如果 secret 不存在,或者版本不存在(在 'secret' 引擎中)。