Browse Source
This commit rejects the invocation of an effectively private handler method on a CGLIB proxied controller for both Spring MVC and Spring WebFlux. Closes gh-35352 Co-authored-by: Sam Brannen <104798+sbrannen@users.noreply.github.com> Signed-off-by: Yongjun Hong <kevin0928@naver.com> Signed-off-by: yongjunhong <yongjunh@apache.org>pull/35619/head
5 changed files with 304 additions and 1 deletions
@ -0,0 +1,37 @@
@@ -0,0 +1,37 @@
|
||||
/* |
||||
* Copyright 2002-present the original author or authors. |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.web.testfixture.method; |
||||
|
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
||||
public class VisibilityTestHandler { |
||||
|
||||
@Controller |
||||
public static class PackagePrivateController { |
||||
@RequestMapping("/package-private") |
||||
void packagePrivateMethod() { |
||||
} |
||||
} |
||||
|
||||
@Controller |
||||
public static class ProtectedController { |
||||
@RequestMapping("/protected") |
||||
protected void protectedMethod() { |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue