采用有参数的构造方法来解决注入你要的属性例如:
public MyInvocationSecurityMetadataSource(RoleService roleService) {
  this.roleService = roleService;
  loadResourceDefine();
}

RoleService 是可以获得资源列表的组件.
在xml配置文件中采用构造函数注入的方式把RoleService 注入到MyInvocationSecurityMetadataSource中.例如
<beans:bean /></beans:constructor-arg>
</beans:bean>

相关文章:

  • 2021-08-17
  • 2022-12-23
  • 2021-11-23
  • 2021-12-09
  • 2021-04-25
猜你喜欢
  • 2021-12-04
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案