Code Monkey home page Code Monkey logo

Comments (4)

chentianming11 avatar chentianming11 commented on May 28, 2024

FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.callTimeout(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;

正常情况下不需要配置@RetrofitScan注解,这个报错是okhttp3版本问题,请使用3.14.9及以上版本。
ps:@RetrofitScan配置在启动类上即可

from retrofit-spring-boot-starter.

doyard avatar doyard commented on May 28, 2024

建议okhttp版本跟着retrofit版本走吧,retrofit 2.9.0 依赖了3.8.1, 你这里使用了3.14.9的特性,大概率冲突

from retrofit-spring-boot-starter.

chentianming11 avatar chentianming11 commented on May 28, 2024

from retrofit-spring-boot-starter.

15695521334 avatar 15695521334 commented on May 28, 2024

我的开始也报这个错,然后按上面更新了版本,
image,截图如上。结果报另外一个错,如下:
... 18 common frames omitted
Caused by: java.lang.ClassNotFoundException: okhttp3.Interceptor
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 22 common frames omitted

from retrofit-spring-boot-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.