Merge pull request #14586 from anuragkumawat/JAVA-24001

JAVA-24001 Check Article Code Matches GitHub - Week 33 - 2023
This commit is contained in:
Loredana Crusoveanu 2023-08-27 19:29:23 +03:00 committed by GitHub
commit 17675c8775
4 changed files with 7 additions and 7 deletions

View File

@ -8,9 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SecurityController3 {
public class GetUserWithAuthenticationController {
public SecurityController3() {
public GetUserWithAuthenticationController() {
super();
}

View File

@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class SecurityController4 {
public class GetUserWithAuthenticationPrincipalAnnotationController {
@GetMapping("/user")
public String getUser(@AuthenticationPrincipal UserDetails userDetails) {

View File

@ -8,9 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SecurityController {
public class GetUserWithPrincipalController {
public SecurityController() {
public GetUserWithPrincipalController() {
super();
}

View File

@ -11,12 +11,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SecurityController1 {
public class GetUserWithSecurityContextHolderController {
@Autowired
private ApplicationEventPublisher eventPublisher;
public SecurityController1() {
public GetUserWithSecurityContextHolderController() {
super();
}