看起来问题出在@Value批注。它应该用作
@Value("${<property}"),如果没有正确使用,Spring Boot不会绑定该值。@Value("${spring.queries.users-query}")private String usersQuery;@Value("${spring.queries.roles-query}")private String rolesQuery;您无需在此处传递/添加用户名值。usersByUsernameQuery()用于显式设置查询。



