扫描@Table @Column @EmbeddedId 注解,获取实体的表名和字段名
List<String[]> list = new ArrayList<>();
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);
scanner.addIncludeFilter(new AnnotationTypeFilter(Table.class));
for (BeanDefinition bd : scanner.findCandidateComponents("com.test.domain.*")) {
Class<?> clazz = Class.forName(bd.getBeanClassName());
Table myClassAnnotation = clazz.getAnnotation(Table.class);
String tableNm = myClassAnnotation.name().toUpperCase();
// 获得字段注解
Field fields[] = clazz.getDeclaredFields();
for (Field field : fields) {
// 获取普通属性的@Column注解
Column myFieldAnnotation = field.getAnnotation(Column.class);
if (myFieldAnnotation != null) {
String fieldNm = myFiel