Class KeyStoreFactoryBean

All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<KeyStore>, org.springframework.beans.factory.InitializingBean

public class KeyStoreFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<KeyStore>, org.springframework.beans.factory.InitializingBean
Spring factory bean for a KeyStore.

To load an existing key store, you must set the location property. If this property is not set, a new, empty key store is created, which is most likely not what you want.

Arjen Poutsma
See Also:
  • Constructor Details

    • KeyStoreFactoryBean

      public KeyStoreFactoryBean()
  • Method Details

    • setLocation

      public void setLocation( location)
      Sets the location of the key store to use. If this is not set, a new, empty key store will be used.
      See Also:
    • setPassword

      public void setPassword(String password)
      Sets the password to use for integrity checking. If this property is not set, then integrity checking is not performed.
    • setProvider

      public void setProvider(String provider)
      Sets the provider of the key store to use. If this is not set, the default is used.
    • setType

      public void setType(String type)
      Sets the type of the KeyStore to use. If this is not set, the default is used.
      See Also:
    • getObject

      public KeyStore getObject()
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<KeyStore>
    • getObjectType

      public Class<KeyStore> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<KeyStore>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<KeyStore>
    • afterPropertiesSet

      public final void afterPropertiesSet() throws GeneralSecurityException, IOException
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean