Issues in embedding KeyCloak 26.0.5 in Springboot Application

Hello,

I’m working on a project that runs embedded keycloak in the spring boot application. I followed the article https://www.baeldung.com/keycloak-embedded-in-spring-boot-app for my development. This works fine with KeyCloak 24.0.4. However, while using KeyCloak 26.0.5, I am facing the below issues -

  1. I am using KeycloakSession as suggested in the article, and for that I am creating a custom AbstractRequestFilter. Below is the code snippet -
public class EmbeddedKeycloakRequestFilter extends AbstractRequestFilter implements Filter {

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		request.setCharacterEncoding(StandardCharsets.UTF_8.name());
        ClientConnection clientConnection = createConnection((HttpServletRequest) request);

        filter(clientConnection, (session) -> {
            try {
                chain.doFilter(request, response);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        });
	}

	private ClientConnection createConnection(HttpServletRequest request) {
	...
	}
}

As the class AbstractRequestFilter is not available in KeyCloak 26.0.5, the above code is not working in KeyCloak 26.0.5. Need guidance how to handle custom filtering in KeyCloak 26.0.5 embedded in Springboot.
2. I have implemented interface ResteasyProvider in the project, and this interface is deprecated in KeyCloak 26.0.5. Need guidance what to use instead.

Thanks in advance.