我试图测试使用Springboot 1.5我不断收到对未发现FilterRegestionBean类异常的服务时发现DEF FilterRegistrationBean。Springboot 1.5没有CLASSE试图测试服务
@RunWith(SpringRunner.class)
@SpringBootTest
class ApiServiceSpecTest {
@Autowired
ApiService apiService;
@Test
public void testGetApis() {
List<Api> apis = this.apiService.getApis("KFS")
given(this.apiService.getApis("KFS")).willReturn("some stuff")
assertThat(!apis.empty)
}
我的build.gradle样子:
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version:'1.1.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version:'1.5.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version:'1.5.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-jdbc', version:'1.5.1.RELEASE'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-mail', version:'1.5.1.RELEASE'
compile(group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:'1.5.1.RELEASE')
我检查的文件,感觉就像我已经实现了的例子,但我不能让它运行。任何帮助将不胜感激。
非常感谢! – Ryan