I was trying to implement authentication using spring security and webflux and got this error. Looks like the core package cannot find the dependency jakarta/servlet/Filter even after adding it. I used spring boot 3.1.1, spring boot webflux and jakarta.

SpringBoot FileNotFoundException: class path resource [jakarta/servlet/Filter.class] cannot be opened because it does not exist

SpringBoot FileNotFoundException: class path resource [jakarta/servlet/Filter.class] cannot be opened because it does not exist

SpringBoot FileNotFoundException: class path resource [jakarta/servlet/Filter.class] cannot be opened because it does not exist

SpringBoot FileNotFoundException: class path resource [jakarta/servlet/Filter.class] cannot be opened because it does not exist

SpringBoot FileNotFoundException: class path resource [jakarta/servlet/Filter.class] cannot be opened because it does not exist

Comment From: bclozel

Thanks for getting in touch, but it feels like this is a question that would be better suited to StackOverflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

In this case, you should explain in details why you're trying to use the Servlet API in the context of a WebFlux application. Spring Security does support authentication with WebFlux with dedicated implementations that don't need the Servlet API. Thanks!