I am trying to advice a method with pointcut.
All other pointcut are working, This is the aspect signature, and commented @Before pointcuts are the ones that work. But I am not sure why last bulkInsert pointcut is not working.
//@Before("execution(public * com.service.dao.WorkStayDao.update(..))")
// @Before("execution(public * com.workunit.WorkService.isSkipUpdateWorkUnit(..))")
@Before("execution(public * com.service.dao.WorkGoDao.bulkInsert(..))")
public void logMethodCall(JoinPoint jp) throws JsonProcessingException {}
WorkGoDao.bulkInsert() gets called from WorkStayDao.update() method.
update() signature is
public Work update(String userID, final Work workt)
bulkInsert() Signature is
public void bulkInsert(String UserId, Set<Work> work, SqlSession session)
WorkGoDao class is also marked as @Service.
My Aspect class is also annotated with all required Annotations
@Aspect
@Configuration
@EnableAspectJAutoProxy
public class ErrorLoggingAspect
Goal is that: bulkInsert Should call the logMethodCall() before execution.
I am not sure why methods from same packages are behaving differently on being advised. I have looked at all aspect related queries but can't find the solution. And the biggest issue that it's really hard to debug as no error logs are printed. I am using Intellij to run locally.
Am I missing any concept or something, any help will be really appreciated, even ways to debug.