Using annotation @Sql, is it possible to execute scripts in Class level before Method level?
- 阅读更多 关于 Using annotation @Sql, is it possible to execute scripts in Class level before Method level?
问题 I want to execute two scripts before every test method, but i also want to define some scripts to execute before specific methods. Using Spring framework and @Sql annotations, is it possible? @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/WEB-INF/application-context.xml") @DirtiesContext(classMode = ClassMode.BEFORE_EACH_TEST_METHOD) @Sql({ "/database/drop_schema.sql", "/database/create_schema.sql" }) public class CentralServiceTestCase { // I want to run "drop_schema.sql",