如何使用 SecretLeaseContainer 更新 spring vault Postgres 后端凭据?
@override public void afterPropertiesSet() 抛出异常 {
final RequestedSecret secret = RequestedSecret.renewable("postgres/creds/readonly");
leaseContainer.addLeaseListener(new LeaseListener() {
@Override
public void onLeaseEvent(SecretLeaseEvent secretLeaseEvent) {
if (secretLeaseEvent instanceof LeaseExpiredEvent) {
????
}
}
});
leaseContainer.addRequestedSecret(secret);
}