Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to run spring boot 2.1.1 But I am facing following error Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] in Java. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How This Error Occurs ?
I am trying to run spring boot 2.1.1 But I am facing following error.
[classes/:na] Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@73d16e93] at org.springframework.util.ReflectionUtils.getDeclaredMethods
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64) ~[spring-boot-autoconfigure-2.1.1.RELEASE.jar:2.1.1.RELEASE]
How To Solve Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] Error ?
- How To Solve Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] Error ?
To Solve Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] Error You just need to remove scope part from spring-boot-starter-tomcat. Just like this. Now, Your error must be solved.
- Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration]
To Solve Failed to introspect Class [org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration] Error You just need to remove scope part from spring-boot-starter-tomcat. Just like this. Now, Your error must be solved.
Solution 1: remove scope part from spring-boot-starter-tomcat
You just need to remove scope part from spring-boot-starter-tomcat. Just like this.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope> // remove This Line
</dependency>
Now, Your error must be solved.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read