salut

j'utilise un intercepteur spring

Partie 1
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"applicationContext.xml"});
UserFacade user = (UserFacade) context.getBean("interceptedService");
config xml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
<bean id="securityInterceptor" class="test.logic.UserValidationImpl">
    <property name="userImpl" ref="odUserDao"/>
</bean>
 
<bean id="interceptedService" class="org.springframework.aop.framework.ProxyFactoryBean">
    <property name="target">
        <ref bean="odUserDao"/>
    </property>
    <property name="interceptorNames">
        <list>
            <value>securityInterceptor</value>
        </list>
    </property>
</bean>
dans UserValidationImpl, j'ai une variable nommé currentUser
dans le code de la partie 1, comment affecter une valeur à cette variable?
dois-je en plus ajouter quelques chose dans le fichier xml?

merci