在大多数场景下,同一套产品只会有一个主要的LoginAuthentication生效,而LoginInterceptor对顺序不敏感,原则上不需要排序。
但如果要对LoginAuthentication和LoginInterceptor进行排序,可以在插件目录定义一个login.xml,如(WEB-INF\cfgHome\plugin\myplugin\login.xml)
<?xml version="1.0" encoding="UTF-8"?> <login> <bean class="com.seeyon.apps.login.CustomLoginInterceptor" before="com.seeyon.ctp.login.interceptor.LockLoginInterceptor"/> <bean class="com.seeyon.apps.login.CustomLoginAuthentication" after
="com.seeyon.v3x.plugin.ca.CALoginAuthentication"/> </login>
将CustomLoginInterceptor放到com.seeyon.ctp.login.interceptor.LockLoginInterceptor之前执行。 |
|
将CustomLoginAuthentication放到com.seeyon.v3x.plugin.ca.CALoginAuthentication之后执行。 |
一旦定义了login.xml,对应的bean就无需在spring xml中注册。