java - 使用 Flink 的 Spring Boot Gradle 项目不起作用
问题描述
我有一个使用 LogBack 日志的 Spring Boot Gradle 项目。我希望它支持 Flink,但 Flink 使用的是 Log4j。当我开始这个项目时,它就一直这样。两者结合时不起作用。
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.slf4j:log4j-over-slf4j:1.7.25'
implementation 'org.apache.kafka:kafka-clients:2.1.0'
implementation 'org.apache.flink:flink-java:1.7.2'
implementation 'org.apache.flink:flink-streaming-java_2.12:1.7.2'
implementation 'org.apache.flink:flink-connector-kafka-0.10_2.12:1.7.2'
}
2019-04-03 11:40:20.788 [main]
INFO com.example.server.flinkkafkademo03.FlinkKafkaDemo03Application [SpringApplication.java:679] - The following profiles are active: dev
2019-04-03 11:40:23.798 [flink-akka.actor.default-dispatcher-5]
INFO akka.event.slf4j.Slf4jLogger [Slf4jLogger.scala:92] - Slf4jLogger started 2019-04-03 11:40:23.879 [flink-metrics-2]
INFO akka.event.slf4j.Slf4jLogger [Slf4jLogger.scala:92] - Slf4jLogger started
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.flink.core.memory.HybridMemorySegment (file:/E:/Program%20Files/gradle-5.0/repository/caches/modules-2/files-2.1/org.apache.flink/flink-core/1.7.2/184443282d6269261e2783d5797d2aafbe88253/flink-core-1.7.2.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.flink.core.memory.HybridMemorySegment
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
解决方案
推荐阅读
- css - \@ 媒体查询上的符号及其解释方式
- python - Python - 使用 Selenium 下载 PDF 并保存到磁盘
- reactjs - 索引没有更新,同时过滤掉表数据
- netlify - Netlify Lambda 函数日志永远挂起
- android - 动态查询房间数据库不支持 LiveData 吗?
- python - 如何对 Django REST Framework 中嵌套序列化器字段的源参数进行排序?
- html - 基于Flask(python)的网站创建存储型XSS攻击
- python - 从python命令行调用google api时出错
- python - 如何通过 Python 运行带有参数的 Python 脚本?
- php - Database Updated_at 列未更新