如何解决如何将@Value注释与@RequestBody注释“内联”一起使用-在Spring Boot中使用Spring Security”
我正在使用旧代码来通过JWT学习Spring Security。
我在这段代码上收到以下错误(特别是在@RequestBody上)
authenticateUser(@Value @RequestBody
“ loginRequest”){。 。 。
错误:语法错误,插入“ Type VariableDeclaratorId”以完成FormalParameterList
建议表示赞赏。谢谢。
代码:
@RestController
@RequestMapping("/bb/auth")
public class AuthController {
@Autowired
AuthenticationManager
authenticationManager;
@Autowired
UserRepository userRepository;
@Autowired
PasswordEncoder encoder;
@Autowired
JwtUtils jwtUtils;
LoginRequest loginRequest;
@PostMapping("/login")
public ResponseEntity<?>
authenticateUser(@Value @RequestBody
"loginRequest") { . . .}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。