@SpringBootTest(
webEnvironment = WebEnvironment.RANDOM_PORT,
properties = {
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:${server.port}/jwks.json",
...
},
...
)
@EnableWebSecurity
public class ApplicationWebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) {
web.ignoring()
.antMatchers("/*.json");
}
...
<dependency>
<groupId>com.tymiq</groupId>
<artifactId>spring-boot-jwt-test</artifactId>
<version>0.1.2</version>
<scope>test</scope>
</dependency>