Interceptor method not called with interceptor binding

后端 未结 3 1414
甜味超标
甜味超标 2020-12-10 13:06

I\'m using Java EE 6 & Jboss AS7.1 and try to use interceptor binding (Example from jboss site).

I have an InterceptorBinding annotation:

@Interc         


        
3条回答
  •  情书的邮戳
    2020-12-10 13:36

    You can use any priority value = Priority.Application is 2000 by default.

    For example =

    @Interceptor 
    @Loggable 
    @Priority(100)
    public class FileLogger {}
    

    Priority type:

    • PLATFORM_BEFORE [0-999] - interceptors start at the first. They are started by the platform.
    • LIBRARY_BEFORE [1000-1999] - by the libraries.
    • APPLICATION [2000-2999]- by the application
    • LIBRARY_AFTER,PLATFORM_AFTER [3000-4000]

    You manage primary loading for interceptors.

提交回复
热议问题