2017-04-06 36 views
0

位置spring-boot-integration-tests-1.5.2.RELEASE位於spring-boot-security-tests-1.5.2.RELEASE的父級並且無法在中央存儲庫中加載(找到)。如何查找spring-boot-integration-testing maven artifact

+0

換句話說:如何將Spring Boot安全測試添加到我的項目中,以便有可能使用註釋(如@WithMockUser)(authorities =「ADM在」) –

回答

0

你需要明確地增加了Spring的安全測試模塊

如果您正在使用gradle這個聲明爲testCompile('org.springframework.security:spring-security-test')

如果Maven就會

<dependency> 
    <groupId>org.springframework.security</groupId> 
    <artifactId>spring-security-test</artifactId> 
</dependency> 

注::版本是由彈簧保持boot parent pom

相關問題