springboot集成flink和mybatis

springboot集成flink和mybatis,第1张

springboot集成flink和mybatis

flink有一套自己的流程处理模式 不能随意转换其类型 目前集成的mybatis也就算是半集成,还没有思路去集成mybatis-Plus

上代码:

目前先会放上一层接口调用流程来记录

entity:

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.stereotype.Component;

import java.io.Serializable;


@Component
@Data
@ToString
//@NoArgsConstructor
//@AllArgsConstructor
@TableName("t_student")
public class Student implements Serializable {


    private static final long serialVersionUID = 5768417941637790054L;
    private String id;
    private String name;
    private Integer age;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Student(String id, String name, Integer age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public Student() {
    }

    @Override
    public String toString() {
        return "Student{" +
                "id='" + id + ''' +
                ", name='" + name + ''' +
                ", age=" + age +
                '}';
    }
}

DAO:

import com.baomidou.mybatisplus.core.mapper.baseMapper;
import com.founder.bigdata.compute.demo.bean.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface StudentMapper extends baseMapper {

    Student selectStudents(@Param("id")String id);

    int addStudent(Student student);

}