how to handle deprecated HandlerInterceptorAdapter in spring mvc
Asked Answered
A

1

12

HandlerInterceptorAdapter is deprecated

this is my code

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class MyInterceptor extends HandlerInterceptorAdapter{
    
}

screenshot of code

enter image description here

Ahron answered 30/7, 2022 at 8:36 Comment(1)
From the docs of HandlerInterceptorAdapter - Deprecated. as of 5.3 in favor of implementing HandlerInterceptor and/or AsyncHandlerInterceptor directly.Perfumer
A
22

The Handler interceptor adapter deprecated because new HandlerInterceptor interface have default methods now. Simple remove HandlerInterceptorAdapter and implements HandlerInterceptor.

Abbevillian answered 31/7, 2022 at 5:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.