我正在为我的 Spring/Groovy 应用程序寻找一个映射框架。我找到了Nomin - 它看起来很适合我的需要。但我有以下问题:它在我的测试类中找不到我的映射规则脚本。
在src/main/groovy/mypackage/entity2entitydto.groovy:
import org.nomin.entity.*
mappingFor a: Entity, b: EntityDto
a.name = b.name
在src/test/groovy/mypackage/Entity2EntityDtoTest.groovy:
public class CoinMarketCap2CoinTest {
NominMapper nomin = new Nomin("entity2entitydto.groovy");
// also tried entity2entitydto, Entity2entitydto, Entity2entitydto.groovy
// also tried with full package name
// also tried File Name Entity2entitydto.groovy
@Test
public void test() {
// Testing ...
}
}
之后的结果gradle clean build --stacktrace
org.nomin.core.NominException: Specified resource entity2entitydto.groovy isn't found!
...
有人对适用于 groovy 的映射框架有任何想法或建议。提前致谢。