Flink中因java的泛型擦除导致的报错及解决

【报错】

java 复制代码
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'Custom Source' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface.

【解决】

好,我接受他的建议

再次运行

数据正常!

相关推荐
Wenweno0o19 小时前
0基础Go语言Eino框架智能体实战-chatModel
开发语言·后端·golang
@yanyu66619 小时前
07-引入element布局及spring boot完善后端
javascript·vue.js·spring boot
chenjingming66619 小时前
jmeter线程组设置以及串行和并行设置
java·开发语言·jmeter
@大迁世界20 小时前
2026年React大洗牌:React Hooks 将迎来重大升级
前端·javascript·react.js·前端框架·ecmascript
cch891820 小时前
Python主流框架全解析
开发语言·python
不爱吃炸鸡柳20 小时前
C++ STL list 超详细解析:从接口使用到模拟实现
开发语言·c++·list
十五年专注C++开发20 小时前
RTTR: 一款MIT 协议开源的 C++ 运行时反射库
开发语言·c++·反射
Momentary_SixthSense20 小时前
设计模式之工厂模式
java·开发语言·设计模式
风止何安啊20 小时前
为什么要有 TypeScript?让 JS 告别 “薛定谔的 Bug”
前端·javascript·面试
‎ദ്ദിᵔ.˛.ᵔ₎20 小时前
STL 栈 队列
开发语言·c++