Java Code Examples for org.springframework.beans.factory.config.MethodInvokingFactoryBean#setStaticMethod()

The following examples show how to use org.springframework.beans.factory.config.MethodInvokingFactoryBean#setStaticMethod() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShiroAuthConfig.java    From Moss with Apache License 2.0 5 votes vote down vote up
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(SecurityManager securityManager){
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(securityManager);
    return bean;
}
 
Example 2
Source File: ShiroConfig.java    From MeetingFilm with Apache License 2.0 5 votes vote down vote up
/**
 * 在方法中 注入 securityManager,进行代理控制
 */
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(DefaultWebSecurityManager securityManager) {
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(new Object[]{securityManager});
    return bean;
}
 
Example 3
Source File: ShiroConfig.java    From WebStack-Guns with MIT License 5 votes vote down vote up
/**
 * 在方法中 注入 securityManager,进行代理控制
 */
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(DefaultWebSecurityManager securityManager) {
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(new Object[]{securityManager});
    return bean;
}
 
Example 4
Source File: ShiroConfig.java    From springboot-shiro with MIT License 5 votes vote down vote up
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(SecurityManager securityManager){
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(securityManager);
    return bean;
}
 
Example 5
Source File: ShiroConfiguration.java    From watchdog-framework with MIT License 5 votes vote down vote up
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(SecurityManager securityManager){
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(securityManager);
    return bean;
}
 
Example 6
Source File: ShiroConfig.java    From OneBlog with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 修复UnavailableSecurityManagerException(详见issues#IK7C3)
 *
 * @param securityManager
 * @return
 */
@Bean
public MethodInvokingFactoryBean methodInvokingFactoryBean(SecurityManager securityManager) {
    MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean();
    bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
    bean.setArguments(securityManager);
    return bean;
}
 
Example 7
Source File: SecurityConfiguration.java    From java-platform with Apache License 2.0 5 votes vote down vote up
@Bean
public MethodInvokingFactoryBean setSecurityManager() {
	MethodInvokingFactoryBean factoryBean = new MethodInvokingFactoryBean();
	factoryBean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager");
	factoryBean.setArguments(new Object[] { securityManager() });
	return factoryBean;
}
 
Example 8
Source File: EncryptionConfig.java    From dhis2-core with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Bean
public MethodInvokingFactoryBean addProvider()
{
    MethodInvokingFactoryBean methodInvokingFactoryBean = new MethodInvokingFactoryBean();
    methodInvokingFactoryBean.setStaticMethod( "java.security.Security.addProvider" );
    methodInvokingFactoryBean.setArguments( new BouncyCastleProvider() );
    return methodInvokingFactoryBean;
}