我正在 testapacheflink和springboot之间的集成,在IDE上运行它们是可以的,但是当我试图在apacheflink集群上运行时,我遇到了一个与类加载器相关的异常。
课程非常简单:
引导应用
@SpringBootApplication
@ComponentScan("com.example.demo")
public class BootFlinkApplication {
public static void main(String[] args) {
System.out.println("some test");
SpringApplication.run(BootFlinkApplication.class, args);
}
}
燧石
@Service
public class FlinkTest {
@PostConstruct
public void init() {
StreamExecutionEnvironment see = StreamExecutionEnvironment.getExecutionEnvironment();
see.fromElements(1, 2, 3, 4)
.filter(new RemoveNumber3Filter()).print();
try {
see.execute();
} catch (Exception e) {
System.out.println("Error executing fl