Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
src
README.md
pom.xml

README.md

JDAL Spring AOP Module

This module contains the following Spring AOP Aspects.

Support for @DeclareMixin AspectJ annotation.

To use @DeclareMixin in Spring AOP you only need to declare a bean of type DeclareMixinAutoProxyCreatorConfigurer in you context.

<bean id="declareMixinConfigurer" class="org.jdal.aop.DeclareMixinAutoProxyCreatorConfigurer" />

or if using JavaConfig:

@Configuration
public class AppConfig {
    @Bean
    public declareMixinConfigurer() {
        return new DeclareMixinAutoProxyCreatorConfigurer();
    }
}

Serializable proxy support.

To enable serializable proxies use the following bean definitions in context configuration file:

<!-- Enable @SerializableProxy support -->
<bean id="serializableAnnotationBeanPostProcessor" class="org.jdal.aop.config.SerializableAnnotationBeanPostProcessor" />
<bean id="serializableProxyAdvisor" class="org.jdal.aop.SerializableProxyAdvisor" scope="prototype"/>

To replace a bean in the Spring context globally, we can use the <jdal:serializable-proxy> tag in jdal spring custom namespace:

<bean id="someBean" class="some.package.SomeBean">
    <property name="someProperty" value="someValue" />
    <jdal:serializable-proxy />  <!-- Replace this bean with a serializable proxy -->
</bean>

Or we can use @SerializableProxy annotation on the bean types.

@Component
@SerializableProxy
public class StoreService {
    ...
}

Finally, we can replace only the reference in the component without touching the Spring context, just using the annotation in the autowired field.

public class MainLayout extends VerticalLayout {
 
    @Autowired
    @SerializableProxy
    private CustomerDao customerDao;
}

Maven

The latest released version is 2.0.0. configure maven as follows to include it.

<repositories>
       <repository>
            <id>jdal</id>
            <name>JDAL Repository</name>
            <url>http://www.jdal.org/repo</url>
       </repository>
</repositories>

...

<dependency>
       <groupId>org.jdal</groupId>
       <artifactId>jdal-aop</artifactId>
       <version>2.0.0</version>
</dependency>