asleepyfish / chatgpt

实现可连续对话和流式输出的ChatGPT API(基于SpringBoot和Vue实现流式输出)
https://blog.csdn.net/qq_41821963/article/details/128992539
MIT License
244 stars 67 forks source link

救救孩子 #26

Closed zhaowendao2023 closed 1 year ago

zhaowendao2023 commented 1 year ago

大佬,在用你给的demo没有任何问题,但我自己的所以项目都报同一个错误 Error creating bean with name 'okHttpClient' defined in io.github.asleepyfish.config.ChatGPTAutoConfigure: Failed to instantiate [okhttp3.OkHttpClient]: Factory method 'okHttpClient' threw exception with message: javax/servlet/ServletOutputStream 救救孩子吧

asleepyfish commented 1 year ago

大佬,在用你给的demo没有任何问题,但我自己的所以项目都报同一个错误 Error creating bean with name 'okHttpClient' defined in io.github.asleepyfish.config.ChatGPTAutoConfigure: Failed to instantiate [okhttp3.OkHttpClient]: Factory method 'okHttpClient' threw exception with message: javax/servlet/ServletOutputStream 救救孩子吧

当没自定义okHttpClient的时候会使用默认的构造,检查一下

zhaowendao2023 commented 1 year ago

在引入servlet依赖之后才解决了,但我看大佬的demo里并没有引入,难道是Java或者idea自带,然后我用17版的JDK所以冲突了?还得多学习

asleepyfish commented 1 year ago

在引入servlet依赖之后才解决了,但我看大佬的demo里并没有引入,难道是Java或者idea自带,然后我用17版的JDK所以冲突了?还得多学习

我一直用的Java17没问题的