Java Code Examples for org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor#setAdvice()
The following examples show how to use
org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor#setAdvice() .
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: DigestLoggerConfig.java From AnyMock with Apache License 2.0 | 5 votes |
@Bean public Advisor digestLogger() { AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression("within(com.dxm.anymock.common.dal.dao..*)"); advisor.setAdvice(new DigestLogger()); return advisor; }
Example 2
Source File: CounterMetricsAdvice.java From super-cloudops with Apache License 2.0 | 5 votes |
@Bean public AspectJExpressionPointcutAdvisor counterAspectJExpressionPointcutAdvisor(CounterMetricsProperties conf, CounterMetricsAdvice advice) { Assert.notNull(conf.getExpression(), "Expression of the counter AOP pointcut is null."); if (log.isInfoEnabled()) { log.info("Initial counterAspectJExpressionPointcutAdvisor. {}", conf); } AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression(conf.getExpression()); advisor.setAdvice(advice); return advisor; }
Example 3
Source File: TimerMetricsAdvice.java From super-cloudops with Apache License 2.0 | 5 votes |
@Bean public AspectJExpressionPointcutAdvisor timerAspectJExpressionPointcutAdvisor(TimerMetricsProperties conf, TimerMetricsAdvice advice) { Assert.notNull(conf.getExpression(), "Expression of the timeouts AOP pointcut is null."); if (log.isInfoEnabled()) { log.info("Initial timerAspectJExpressionPointcutAdvisor. {}", conf); } AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression(conf.getExpression()); advisor.setAdvice(advice); return advisor; }
Example 4
Source File: XssAutoConfiguration.java From super-cloudops with Apache License 2.0 | 5 votes |
@Bean @ConditionalOnBean(XssResolveAdviceInterceptor.class) public AspectJExpressionPointcutAdvisor xssSecurityResolverAspectJExpressionPointcutAdvisor(XssProperties config, XssResolveAdviceInterceptor advice) { AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression(config.getExpression()); advisor.setAdvice(advice); return advisor; }
Example 5
Source File: AopConfig.java From justtestlah with Apache License 2.0 | 5 votes |
@Bean public AspectJExpressionPointcutAdvisor stepsLoggingAdvisor() { AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression(POINTCUT_TEMPLATE.replaceFirst("__package__", stepsPackage)); advisor.setAdvice(entryExitLoggingAspect()); return advisor; }
Example 6
Source File: AopConfig.java From justtestlah with Apache License 2.0 | 5 votes |
@Bean public AspectJExpressionPointcutAdvisor pagesLoggingAdvisor() { AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor(); advisor.setExpression(POINTCUT_TEMPLATE.replaceFirst("__package__", pagesPackage)); advisor.setAdvice(entryExitLoggingAspect()); return advisor; }