How to create my own filter with Spring MVC?

前端 未结 7 1550
名媛妹妹
名媛妹妹 2020-12-14 07:40

I use Spring MVC (4.0.1) as a backend for rest services and angularjs as frontend.

every request to my server backend has a http-header with a session id

I c

7条回答
  •  不思量自难忘°
    2020-12-14 07:57

    Spring can use filters, but they recommend that you use their version of filters, known as an interceptor

    http://viralpatel.net/blogs/spring-mvc-interceptor-example/

    There is a quick run through of how they work. They are nearly identical to filters, but designed to work inside the Spring MVC lifecycle.

提交回复
热议问题