java - Restlet Framework and Spring - Global filter -
i'm having problem restlet framework configuration spring. want have 1 global filter requests , responses. guess can utilize filter
class , it's methods beforehandle
, afterhandle
, setnext
this:
filter.beforehandle() -> router -> filter.afterhandle()
the problem is, i'm using spring configured restlet , don't know if regular filter work correctly springrouter org.restlet.ext.spring package. current restlet configuration follows:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="root" class="org.restlet.ext.spring.springrouter"> <property name="attachments"> <map> <entry key="/login"> <bean class="org.restlet.ext.spring.springfinder"> <lookup-method name="create" bean="loginresource" /> </bean> </entry> </map> </property> </bean> </beans>
i'm thinking adding bean id root , class extends class filter
, , pass property next
bean id router (which called root). think solution?
mixing restlet classes spring extension other 1 shouldn't issue. spring* classes provide additional configurability.
java spring restlet
No comments:
Post a Comment