package de.spring.example;
-import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionStatus;
-@Aspect
public class TransactionManager {
private static final Logger LOGGER = LoggerFactory.getLogger(TransactionManager.class);
private static TransactionManager instance = new TransactionManager();
<!DOCTYPE aspectj PUBLIC
"-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
+ <!-- REQUIRED FILE WHEN USING LOAD TIME WEAVING!!!! -->
+
<aspectj>
<!--
With or without logs
<encoding>${project.build.sourceEncoding}</encoding>
<complianceLevel>1.8</complianceLevel>
<verbose>true</verbose>
+ <warn>constructorName,packageDefaultMethod,deprecation,maskedCatchBlocks,unusedLocals,unusedArguments,unusedImports</warn>
+ <crossrefs>true</crossrefs>
<weaveDirectories>
<weaveDirectory>${project.build.directory}/classes</weaveDirectory>
</weaveDirectories>
<showWeaveInfo>true</showWeaveInfo>
+ <outxml>true</outxml>
<sources>
<source>
<basedir>src/main/java</basedir>
<includes>
- <include>**/aspects/*.java</include>
+ <include>**/*.java</include>
</includes>
<excludes>
<exclude>**/logging/*.aj</exclude>
package de.spring.example;
-import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.TransactionStatus;
-@Aspect
public class TransactionManager {
private static final Logger LOGGER = LoggerFactory.getLogger(TransactionManager.class);
private static TransactionManager instance = new TransactionManager();