首页 文章
  • 3 votes
     answers
     views

    使用PostSharp在c#中使用构造函数的方面

    我正在研究PostSharp中的各种概念 . 更新: 这是我的程序类 namespace myconstructor { class Program { static void Main(string[] args) { createfolder(); streamfolder(); }...
  • 1 votes
     answers
     views

    关于设定器的 spring 建议未触发

    我有以下代码 . 即使调用了setter,也不会触发setter的建议 . 我可以在控制台中看到它 如果我对String getName()做建议,一切正常 . 但它不适用于setter public void setName(String name) . spring.xml <beans xmlns="http://www.springframework.org/schema/...
  • 2 votes
     answers
     views

    如何让Spring @Cacheable在AspectJ方面工作?

    我创建了一个AspectJ方面,它在spring应用程序中运行良好 . 现在我想使用spring Cacheable注释添加缓存 . 要检查@Cacheable是否被选中,我使用的是不存在的缓存管理器的名称 . 常规运行时行为是抛出异常 . 但在这种情况下,不会抛出任何异常,这表明@Cacheable注释未应用于拦截对象 . /* { package, some more imports... }...
  • 1 votes
     answers
     views

    转换器上的Spring Aspect

    我创建了一个简单的Aspect注释,用于测量带注释方法的执行时间 . 当我注释一个简单的Spring Bean的方法,注入bean,并像 bean.annotatedMethod() 一样运行它,一切正常 . 但是,当我在Spring Converter上注释 convert() 方法时,注释会被忽略 . 我猜测的原因是Spring的ConversionService在内部调用了 convert(...

热门问题