MyBatisSqlReader implements SqlReader { @Override public Sqls readFrom(SqlSources sqlSources) { try (URLClassLoader classLoader = new URLClassLoader(sqlSources.urls(), Configuration.class.getClassLoader())) { Resources.setDefaultClassLoader(classLoader); return extractSql(sqlSources, classLoader); } catch (IOException e) { LOGGER.warn("SQL読み込みに失敗（処理続行）", e); return new Sqls(SqlReadStatus.失敗); } }  @Override Sqls readFrom(SqlSources sqlSources);  }
@Test void bindを使ってても解析できる() { MyBatisSqlReader sut = new MyBatisSqlReader(); Sqls sqls = sut.readFrom(new SqlSources(TestSupport.getTestResourceRootURLs(), Collections.singletonList("stub.infrastructure.datasource.SampleMapper"))); Sql sql = sqls.list().get(0); assertThat(sql.tables().asText()).isEqualTo("[fuga]"); }