title: Aspectj functions through external library
body: <p>I have an external library which is not an spring application. It defines few Aspectj functions/PointCuts but it is  not getting called when i am using this library in an spring boot application. When i define the pointcuts in spring boot application itself it is working fine. I guess something is wrong with my configuration like @EnableAspectJAutoProxy not working or something.</p>
  
  <p>Code of service-:</p>
  
  <pre><code>@EnableAspectJAutoProxy
  @Service
  public class LtRequest {
      RestTemplate restTemplate;
  
      public LtRequest() {
          restTemplate = new RestTemplate();
          restTemplate.setErrorHandler( new LtResponseErrorHandler());
      }
  
      public Object request(String url, LtRequestType type, Class clz){
          return null;
      }
      public RestResponseDTO getObject(String url,Class clz){
          RestResponseDTO restResponseDTO =restTemplate.getForObject(url,RestResponseDTO.class);
          //LtUtil.parseRequest(restResponseDTO);
          return restResponseDTO;
      }
  
      private  void postObject(String url,Object obj){
          RestResponseDTO restResponseDTO =restTemplate.postForObject(url,obj,RestResponseDTO.class);
  
      }
  
  
  
  
  }
  </code></pre>
  
  <p>Code of aspectj pointcut</p>
  
  <pre><code>@Aspect
  @Component
  public class ParseRequestAspect {
      static final Logger logger = LogManager.getLogger(ParseRequestAspect.class);
      @Around("execution(* com.limetray.helper.utils.LtRequest.getObject(..))")
      public Object parseRequestAfterReturn(ProceedingJoinPoint joinPoint) {
          logger.info("calling after return aspect function..");
          try{
              RestResponseDTO response = (RestResponseDTO) joinPoint.proceed();
              LtUtil.parseRequest(response);
              return response.getResult();
          }
          catch (Throwable e){
              throw new LtException("Exception occured while parsing request response..");
  
          }
  
  
      }
      @After("execution(* com.limetray.helper.utils.LtRequest.getObject(..))")
      public void parseRequestAfterReturn(JoinPoint joinPoint) {
          logger.info("calling after return aspect function..new");
          try{
              /*RestResponseDTO response = (RestResponseDTO) joinPoint.proceed();
              LtUtil.parseRequest(response);
              return response.getResult();*/
          }
          catch (Throwable e){
              throw new LtException("Exception occured while parsing request response..");
  
          }
  
  
      }
  }
  </code></pre>
  
  <p>Both of these classes are in my external library but its not working as expected. Please help.</p>