JAVA-24001 Check Article Code Matches GitHub - Week 33 - 2023
This commit is contained in:
parent
0323955992
commit
9443ad7229
|
@ -8,9 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class SecurityController3 {
|
public class GetUserWithAuthenticationController {
|
||||||
|
|
||||||
public SecurityController3() {
|
public GetUserWithAuthenticationController() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class SecurityController4 {
|
public class GetUserWithAuthenticationPrincipalAnnotationController {
|
||||||
|
|
||||||
@GetMapping("/user")
|
@GetMapping("/user")
|
||||||
public String getUser(@AuthenticationPrincipal UserDetails userDetails) {
|
public String getUser(@AuthenticationPrincipal UserDetails userDetails) {
|
|
@ -8,9 +8,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class SecurityController {
|
public class GetUserWithPrincipalController {
|
||||||
|
|
||||||
public SecurityController() {
|
public GetUserWithPrincipalController() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,12 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class SecurityController1 {
|
public class GetUserWithSecurityContextHolderController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ApplicationEventPublisher eventPublisher;
|
private ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
public SecurityController1() {
|
public GetUserWithSecurityContextHolderController() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue