code: @PostLoad
      public void postLoad() {
          if (principalAttributesRepository == null) {
              this.principalAttributesRepository = new DefaultPrincipalAttributesRepository();
          }
          if (consentPolicy == null) {
              this.consentPolicy = new DefaultRegisteredServiceConsentPolicy();
          }
      }
docs: Post load, after having loaded the bean via JPA, etc.