TaleLin / lin-cms-java-core

A simple and practical CMS implememted by spring-boot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PermissionMetaCollector是否考虑优化一下?

kamyam opened this issue · comments

image
public Object postProcessAfterInitialization(Object bean, String beanName) {
// 加个判断
Method[] methods = ReflectionUtils.getAllDeclaredMethods(bean.getClass());
for (Method method : methods) {
....
}
}
每个类初始化后都用反射获取这个类所有的方法,我觉得可以先判断这个类有没有@RestController或者@controller注解先,这样性能应该会好很多

感谢建议,我们会进行优化