Optional dependency with Spring Boot and Gradle

500 views Asked by At

I need to add optional dependency as a separate jar to my Spring Boot application. If any dependency is added, the application should be able to scan Spring beans from this external jar. We use Spring Boot 2.2.2.RELEASE and Gradle 4.10.2.

Do you know whether Gradle provides any parameter like includeSystemScope in maven?

We've added something like this in Gradle dependencies, but it's not working.

runtime fileTree(dir: '/extensions/', include: '*.jar')

0

There are 0 answers