Registry / testing / spring-security-test

spring-security-test

JSON →
library7.1.0javamavenunverified

Testing support for Spring Security, including mock users and security context setup.

<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <version>7.1.0</version> </dependency>
INSTALL
IMPORT
SIG · SPRING-SECURITY-TE
S
spring-security-test
testingjavav7.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WithMockUser
✓ org.springframework.security.test.context.support.WithMockUser

Annotates a test method with a mock user having the ADMIN role.

import org.springframework.security.test.context.support.WithMockUser; import org.junit.jupiter.api.Test; public class Example { @Test @WithMockUser(roles = "ADMIN") public void testAdminAccess() { // test logic } }
Debug
Known issues
gotchaRequires Spring Security 5.x+; annotation processing must be enabled.
fix
Ensure spring-security-test is on the test classpath and use JUnit 5.
affects: all
Upgrade
Version history
7.1.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
Resources
spring-security-test — mvn dependency:get spring-security-test · libregistry