草庐IT

accumulato

全部标签

java - 从 maven 但不是从 Intellij 执行时测试失败

我正在使用JUnit、PowerMock、SpringTest和内存中的H2数据库编写我的单元测试。当我从Intellij运行测试时,一切运行正常。但是当我从maven(从Intellij或从命令行)运行测试时,它们失败了。这是我的配置:@EnableTransactionManagement@EnableJpaRepositories("my.app.repository")publicclassApplicationTestConfiguration{@BeanpublicSimpleDriverDataSourcedataSource(){SimpleDriverDataSour