alibaba / testable-mock

换种思路写Mock,让单元测试更简单
https://alibaba.github.io/testable-mock/
MIT License
1.83k stars 310 forks source link

testable.version>0.52 无法与 swagger 集成 #205

Open cuiyuanjie opened 3 years ago

cuiyuanjie commented 3 years ago

经过验证发现testable.version>0.6.5时与swagger3集成,Test用例执行就会报错:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'apiDocumentationScanner' defined in URL [jar:file:/C:/Users/xxxx/.m2/repository/io/springfox/springfox-spring-web/3.0.0/springfox-spring-web-3.0.0.jar!/springfox/documentation/spring/web/scanners/ApiDocumentationScanner.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [springfox.documentation.schema.property.ModelSpecificationFactory]: No default constructor found; nested exception is java.lang.NoSuchMethodException: springfox.documentation.schema.property.ModelSpecificationFactory.()

cuiyuanjie commented 3 years ago

经过多次验证,发现testable.version>0.5.2时都会出现错误

linfan commented 2 years ago

我这边实测springfox-spring-web 3.0.0版本和TestableMock 0.7.0版本可以共存,没有发现测试用例执行异常