Created
August 11, 2018 16:24
-
-
Save willianantunes/6cd38b53fbe9590f76902c94b50794ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Aspect | |
@Component | |
public class SampleControllerAspect { | |
private static final Logger LOGGER = LoggerFactory.getLogger(SampleControllerAspect.class); | |
@Around("execution(* br.com.globo.controller.SampleController.sample(String)) && args(honestSampleHeader)") | |
public ModelAndView aroundWallMethod(ProceedingJoinPoint proceedingJoinPoint, String honestSampleHeader) throws Throwable { | |
LOGGER.debug("What was intercepted: {}", honestSampleHeader); | |
return (ModelAndView) proceedingJoinPoint.proceed(List.of(encodeFromHeaderParameter(honestSampleHeader)).toArray()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment