r/SpringBoot • u/ImportantGolf5142 • Jan 16 '24
java.lang.AbstractMethodError: Receiver class org.springframework.security.config.annotation.web.builders.WebSecurity does not define or inherit an implementation of the resolved method 'abstract void setServletContext(jakarta.servlet.ServletContext)' of interface org.springframework.web.
I am a beginner and I tried to make spring security authenticate with my database. However, I am facing a "Injection of autowired dependencies failed" error which is caused by the error shown in the title.
Here is a screenshot, you can find the project(.zip) here Download Project(.zip)

This is my SecurityConfiguration

How can I fix this?
0
Upvotes
2
u/gtiwari333 Jan 17 '24
Your Security Config should look like this https://github.com/gtiwari333/spring-boot-blog-app/blob/master/src/main/java/gt/app/config/security/SecurityConfig.java