File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
test/src/main/java/org/springframework/security/test/aot/hint Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2023 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
23
23
import org .springframework .security .web .context .SecurityContextPersistenceFilter ;
24
24
import org .springframework .security .web .csrf .CsrfFilter ;
25
25
import org .springframework .test .context .aot .TestRuntimeHintsRegistrar ;
26
+ import org .springframework .util .ClassUtils ;
26
27
27
28
/**
28
29
* {@link TestRuntimeHintsRegistrar} implementation that register runtime hints for
@@ -35,6 +36,9 @@ class WebTestUtilsTestRuntimeHints implements TestRuntimeHintsRegistrar {
35
36
36
37
@ Override
37
38
public void registerHints (RuntimeHints hints , Class <?> testClass , ClassLoader classLoader ) {
39
+ if (!ClassUtils .isPresent ("jakarta.servlet.Filter" , classLoader )) {
40
+ return ;
41
+ }
38
42
registerFilterChainProxyHints (hints );
39
43
registerSecurityContextRepositoryHints (hints );
40
44
registerCsrfTokenRepositoryHints (hints );
You can’t perform that action at this time.
0 commit comments