RuoYi
5 years ago
3 changed files with 30 additions and 2 deletions
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.common.security.config; |
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder; |
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry; |
||||
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar; |
||||
import org.springframework.core.type.AnnotationMetadata; |
||||
import com.ruoyi.common.core.utils.StringUtils; |
||||
|
||||
/** |
||||
* 导入 SecurityImportBeanDefinitionRegistrar 自动加载类 |
||||
* |
||||
* @author ruoyi |
||||
*/ |
||||
public class SecurityImportBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar |
||||
{ |
||||
@Override |
||||
public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry registry) |
||||
{ |
||||
Class<ResourceServerConfig> aClass = ResourceServerConfig.class; |
||||
String beanName = StringUtils.uncapitalize(aClass.getSimpleName()); |
||||
BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder.genericBeanDefinition(ResourceServerConfig.class); |
||||
registry.registerBeanDefinition(beanName, beanDefinitionBuilder.getBeanDefinition()); |
||||
|
||||
} |
||||
} |
@ -1,6 +1,5 @@
@@ -1,6 +1,5 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ |
||||
com.ruoyi.common.security.service.UserDetailsServiceImpl,\ |
||||
com.ruoyi.common.security.handler.CustomAccessDeniedHandler,\ |
||||
com.ruoyi.common.security.config.ResourceServerConfig |
||||
com.ruoyi.common.security.handler.CustomAccessDeniedHandler |
||||
|
||||
|
||||
|
Loading…
Reference in new issue