作者:杜伟丿2552 | 来源:互联网 | 2023-09-23 22:06
1 遇到的错误
- 运行时会报类找不到:将pom.xml中的provided注释掉即可,还有一种办法,见官方说明
https://ci.apache.org/projects/flink/flink-docs-master/zh/getting-started/project-setup/dependencies.html
![](https://img.php1.cn/3cd4a/94ce/a6e/865776f6fe3d5f59.jpeg)
![](https://img.php1.cn/3cd4a/1eebe/cd5/43a754c811e7ec5c.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/5287a7b3296ea13e.webp)
- 构建时报错: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate
使用 mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate 替换 mvn archetype:generate
2 编写代码
https://ci.apache.org/projects/flink/flink-docs-master/zh/getting-started/walkthroughs/datastream_api.html
https://ci.apache.org/projects/flink/flink-docs-master/getting-started/walkthroughs/datastream_api.html
3 将代码提交到github
https://github.com/FatliTalk/blog/issues/11
https://mp.weixin.qq.com/s?src=11×tamp=1591498330&ver=2385&signature=1t3crGkTIHXXiy9Ro7fBnMwwONeRiKcU4O8Ee9svqu2bPvJdIWV3kysj1ofpAI1BPow2UNw3urDBV8Y0Z-IZmAbaWJ7943TJbda5JM89eHmb3lWJhJgOl3VUAeKohJkA&new=1
- 提交项目失败,报错: unable to auto-detect email address,在终端中运行这两行命令,设置你的github的邮箱和用户名
![](https://img.php1.cn/3cd4a/1eebe/cd5/7cccb7e4b6cb5cb8.webp)
- 在github中删掉之前创建失败的仓库,进入仓库的settings,拉到最底部
![](https://img.php1.cn/3cd4a/1eebe/cd5/e62700fe09f8933e.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/3e641eb5f5c8cd90.webp)
![](https://img.php1.cn/3cd4a/1eebe/cd5/a5d7215df572c386.webp)