Class UserDetailsManagerResourceFactoryBean
- java.lang.Object
-
- org.springframework.security.config.provisioning.UserDetailsManagerResourceFactoryBean
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.FactoryBean<InMemoryUserDetailsManager>
,org.springframework.context.ResourceLoaderAware
public class UserDetailsManagerResourceFactoryBean extends java.lang.Object implements org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.FactoryBean<InMemoryUserDetailsManager>
Constructs anInMemoryUserDetailsManager
from a resource usingUserDetailsResourceFactoryBean
.- Since:
- 5.0
- See Also:
UserDetailsResourceFactoryBean
-
-
Constructor Summary
Constructors Constructor Description UserDetailsManagerResourceFactoryBean()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UserDetailsManagerResourceFactoryBean
fromResource(org.springframework.core.io.Resource resource)
Create a UserDetailsManagerResourceFactoryBean with a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.static UserDetailsManagerResourceFactoryBean
fromResourceLocation(java.lang.String resourceLocation)
Create a UserDetailsManagerResourceFactoryBean with the location of a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.static UserDetailsManagerResourceFactoryBean
fromString(java.lang.String users)
Create a UserDetailsManagerResourceFactoryBean with a String that is in the format defined inUserDetailsResourceFactoryBean
.InMemoryUserDetailsManager
getObject()
java.lang.Class<?>
getObjectType()
void
setResource(org.springframework.core.io.Resource resource)
Sets a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.void
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
void
setResourceLocation(java.lang.String resourceLocation)
Sets the location of a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.
-
-
-
Method Detail
-
getObject
public InMemoryUserDetailsManager getObject() throws java.lang.Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<InMemoryUserDetailsManager>
- Throws:
java.lang.Exception
-
getObjectType
public java.lang.Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<InMemoryUserDetailsManager>
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
- Specified by:
setResourceLoader
in interfaceorg.springframework.context.ResourceLoaderAware
-
setResourceLocation
public void setResourceLocation(java.lang.String resourceLocation)
Sets the location of a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.- Parameters:
resourceLocation
- the location of the properties file that contains the users (i.e. "classpath:users.properties")
-
setResource
public void setResource(org.springframework.core.io.Resource resource)
Sets a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.- Parameters:
resource
- the Resource to use
-
fromResourceLocation
public static UserDetailsManagerResourceFactoryBean fromResourceLocation(java.lang.String resourceLocation)
Create a UserDetailsManagerResourceFactoryBean with the location of a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.- Parameters:
resourceLocation
- the location of the properties file that contains the users (i.e. "classpath:users.properties")- Returns:
- the UserDetailsManagerResourceFactoryBean
-
fromResource
public static UserDetailsManagerResourceFactoryBean fromResource(org.springframework.core.io.Resource resource)
Create a UserDetailsManagerResourceFactoryBean with a Resource that is a Properties file in the format defined inUserDetailsResourceFactoryBean
.- Parameters:
resource
- the Resource that is a properties file that contains the users- Returns:
- the UserDetailsManagerResourceFactoryBean
-
fromString
public static UserDetailsManagerResourceFactoryBean fromString(java.lang.String users)
Create a UserDetailsManagerResourceFactoryBean with a String that is in the format defined inUserDetailsResourceFactoryBean
.- Parameters:
users
- the users in the format defined inUserDetailsResourceFactoryBean
- Returns:
- the UserDetailsManagerResourceFactoryBean
-
-