在启动Flink作业时报错。可以看到是在实现FlatMapFunction时InvalidTypesException类型无效。提示使用匿名类或者明确指定类型来解决。An easy workaround is to use an (anonymous) class instead that implements the 'org.apache.flink.api.common.functions.FlatMapFunction' interface. Otherwise the type has to be specified explicitly using type information.
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'main(WordCount.java:22)' 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.
at org.apache.flink.api.dag.Transformation.getOutputType(Transformation.java:496)
at org.apache.flink.streaming.api.datastream.DataStream.getType(DataStream.java:193)
at org.apache.flink.streaming.api.datastream.KeyedStream.<init&