Spring MVC - Interceptor never called

后端 未结 6 1993
我寻月下人不归
我寻月下人不归 2021-02-15 15:06

I am trying to configure an interceptor in my application and I am not being able to make it work.

In my application configuration class, I have configured in the follow

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-15 15:39

    Maybe you should add componentscan annotation in the file where the main class is present.

    @ComponentScan("package where the interceptor is placed.")
    

    Worked for me.

提交回复
热议问题