四、自定义sink
1.自定义sink
package code.book.stream.customsinkandsource.jdbc.scala
import java.sql.{Connection, DriverManager, PreparedStatement}
import org.apache.flink.configuration.Configuration
import org.apache.flink.streaming.api.functions.sink.RichSinkFunction
class StudentSinkToMysql extends RichSinkFunction[Student] {
private var connection: Connection = null
private var