Inspectopedia Help

Incorrect configuration of Spring beans referenced in the Spring Security annotation

Reports unresolved Spring beans referenced in Spring Security annotations.

Examples:

  • @WithUserDetails(value = "admin", userDetailsServiceBeanName = "unknownUserDetailsService") // "Cannot resolve 'unknownUserDetailsService' bean" will be reported if 'unknownUserDetailsService' is not defined in the Spring model
  • @WithUserDetails(value = "admin", userDetailsServiceBeanName = "jpaUserDetailsService") //"Bean must be of 'org.springframework.security.core.userdetails.UserDetailsService' type" // will be reported if "jpaUserDetailsService" bean is not of 'UserDetailsService' type

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Spring Security, 233.SNAPSHOT

Last modified: 13 July 2023