I want to do following thing but spring is throwing a exception.
Its throwing the following exceptionCode:public abstract class myAbstractClass{ @BeforeStep public void doSomething() } public class myClass extends myAbstractClass{ public void doSomething(){ //Do something here }
Now the exception goes away if I put the @BeforeStep in my concrete class. However, I want to enforce whoever extends myAbstractClass to make sure that doSomething method executed before the step. I know I can implement StepExecutionListener but I will be only using beforeStep method which means I will be implementing afterStep with nothing in the method body but that's just not nice though. Anyone has solution to this?Code:Caused by: java.lang.IllegalArgumentException: found more than one method on target class [myClass] with the annotation type [BeforeStep].


Reply With Quote