mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
v1.0.0 prepare
This commit is contained in:
parent
da7f10556c
commit
3bb62da834
@ -22,6 +22,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
|
|||||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class MybatisFlexStarter {
|
public class MybatisFlexStarter {
|
||||||
|
|
||||||
@ -38,7 +39,11 @@ public class MybatisFlexStarter {
|
|||||||
|
|
||||||
Row row = bootstrap.execute(RowMapper.class, rowMapper ->
|
Row row = bootstrap.execute(RowMapper.class, rowMapper ->
|
||||||
rowMapper.selectOneById("tb_account", "id", 1));
|
rowMapper.selectOneById("tb_account", "id", 1));
|
||||||
|
|
||||||
System.out.println(row);
|
System.out.println(row);
|
||||||
|
|
||||||
|
|
||||||
|
List<Row> rows = bootstrap.execute(RowMapper.class, rowMapper ->
|
||||||
|
rowMapper.selectAll("tb_account"));
|
||||||
|
System.out.println(rows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
INSERT INTO tb_account
|
INSERT INTO tb_account
|
||||||
VALUES (1, 'Michael Yang', 18, '2020-01-11');
|
VALUES (1, 'Michael Yang', 18, '2020-01-11'),
|
||||||
|
(2, 'Zhang san', 19, '2021-03-21');
|
||||||
Loading…
x
Reference in New Issue
Block a user