How to ignore/remove property from spring.factories file from predefined jar?

207 Views Asked by At

I have created custom SpringApplicationRunListener and added in Meta-INF of project file as org.springframework.boot.SpringApplicationRunListener=
com.dt.testExec

Now,i want to ignore the pre defined property inside .m2/local/org/springframework/boot/spring-boot/2.1.0.RELEASE/spring-boot-2.1.0.RELEASE-sources.jar!/META-INF/spring.factories

org.springframework.boot.SpringApplicationRunListener=
org.springframework.boot.context.event.EventPublishingRunListener

As, when i am running the project, 2 runListener are coming when context gets loaded but i want my custom one i.e "testExec" and not EventPublishingRunListener ?

Or any other way to remove/stop this "EventPublishingRunListener" from "List listeners" when project gets started?

It would be great if anyone can help.

0

There are 0 best solutions below