title: Using Spring Boot, QueryDSL, and Springfox Swagger together - Guava version mismatch
body: <p>I'm trying to use QueryDSL for Spring Data predicate resolution as well as Swagger API documentation for my Spring Boot service. However I've run into a problem. When my application starts, I get this error message:</p>
  
  <pre><code>java.lang.NoSuchMethodError: 'com.google.common.collect.FluentIterable com.google.common.collect.FluentIterable.concat(java.lang.Iterable, java.lang.Iterable)
  
  An attempt was made to call a method that does not exist. The attempt was made from the following location:
   springfox.documentation.schema.DefaultModelDependencyProvider.dependentModels(DefaultModelDependencyProvider.java:79)
  
  The following method did not exist:
  
      'com.google.common.collect.FluentIterable com.google.common.collect.FluentIterable.concat(java.lang.Iterable, java.lang.Iterable)'
  
  The method's class, com.google.common.collect.FluentIterable, is available from the following locations:
  
      jar:file:/my_m2/com/google/guava/guava/18.0/guava-18.0.jar!/com/google/common/collect/FluentIterable.class
  
  Action:
  
  Correct the classpath of your application so that it contains a single, compatible version of com.google.common.collect.FluentIterable
  </code></pre>
  
  <p>I've discovered that this is happening because QueryDSL is dependent on Guava 18.0 library, but Springfox / Swagger is dependent on Guava 20.0 library, so I end up with both versions of the library on my classpath and maven seems to prioritize the 18.0 one. How can I fix this dependency mismatch? Is there any way to force QueryDSL to try to use Guava 20.0 (in the hopes that it will still function)? Or could there possibly be any other way around this?</p>
  
  <p>Versions:
  Spring Boot version: <code>2.1.9.RELEASE</code>
  This version of Spring Boot uses QueryDSL version: <code>4.2.1</code>
  Springfox Swagger version: <code>2.9.2</code></p>