|
16 | 16 |
|
17 | 17 | package de.codecentric.boot.admin.server.ui.web;
|
18 | 18 |
|
19 |
| -import java.security.Principal; |
20 |
| - |
21 | 19 | import org.junit.jupiter.api.Test;
|
22 |
| -import org.springframework.core.MethodParameter; |
23 | 20 | import org.springframework.test.web.servlet.MockMvc;
|
24 | 21 | import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
25 |
| -import org.springframework.web.bind.support.WebDataBinderFactory; |
26 |
| -import org.springframework.web.context.request.NativeWebRequest; |
27 |
| -import org.springframework.web.method.support.HandlerMethodArgumentResolver; |
28 |
| -import org.springframework.web.method.support.ModelAndViewContainer; |
29 | 22 |
|
30 | 23 | import de.codecentric.boot.admin.server.ui.extensions.UiExtensions;
|
31 | 24 | import de.codecentric.boot.admin.server.web.servlet.AdminControllerHandlerMapping;
|
@@ -73,18 +66,7 @@ private MockMvc setupController(String publicUrl) {
|
73 | 66 | return MockMvcBuilders
|
74 | 67 | .standaloneSetup(
|
75 | 68 | new UiController(publicUrl, UiExtensions.EMPTY, UiController.Settings.builder().build()))
|
76 |
| - .setCustomArgumentResolvers(new HandlerMethodArgumentResolver() { |
77 |
| - @Override |
78 |
| - public boolean supportsParameter(MethodParameter parameter) { |
79 |
| - return parameter.getParameterType().equals(Principal.class); |
80 |
| - } |
81 |
| - |
82 |
| - @Override |
83 |
| - public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, |
84 |
| - NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception { |
85 |
| - return null; |
86 |
| - } |
87 |
| - }).setCustomHandlerMapping(() -> new AdminControllerHandlerMapping("")).build(); |
| 69 | + .setCustomHandlerMapping(() -> new AdminControllerHandlerMapping("")).build(); |
88 | 70 | }
|
89 | 71 |
|
90 | 72 | }
|
0 commit comments