dimanche 5 avril 2015

Spring JavaConfig of aop:scoped proxy

What is the JavaConfig equivalent of this?



<!-- an HTTP Session-scoped bean exposed as a proxy
that acts as session storage.
-->
<bean id="checkOutCounter" class="org.brightworks.genesis.client.forms.CheckOutCounter" scope="session">
<!-- this next element effects the proxying of the surrounding bean -->
<aop:scoped-proxy/>
</bean>


Tried declaring it like this but it only acts as a singleton



@Bean
public CheckOutCounter checkOutCounter(){
return new CheckOutCounter();
}


What is the equivalent of the said xml config?


Aucun commentaire:

Enregistrer un commentaire