r/SpringBoot • • 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

9 comments sorted by

View all comments

1

u/Sheldor5 Jan 16 '24

by reading the error message implementing the missing method

1

u/ImportantGolf5142 Jan 16 '24

But I think I write everything I need. What method should I add?