Skip to content

Commit 2ced285

Browse files
朱晔朱晔
authored andcommitted
AspectJ配置AOP的测试
1 parent 2044117 commit 2ced285

File tree

2 files changed

+50
-6
lines changed

2 files changed

+50
-6
lines changed

pom.xml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@
144144
<artifactId>fluent-hc</artifactId>
145145
<version>4.5.9</version>
146146
</dependency>
147-
<dependency>
148-
<groupId>org.springframework.boot</groupId>
149-
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
150-
</dependency>
147+
<!-- <dependency>-->
148+
<!-- <groupId>org.springframework.boot</groupId>-->
149+
<!-- <artifactId>spring-boot-starter-data-elasticsearch</artifactId>-->
150+
<!-- </dependency>-->
151151
<dependency>
152152
<groupId>org.influxdb</groupId>
153153
<artifactId>influxdb-java</artifactId>
@@ -163,14 +163,18 @@
163163
<version>2.1.1</version>
164164
</dependency>
165165
<!-- <dependency>-->
166+
<!-- <groupId>org.springframework</groupId>-->
167+
<!-- <artifactId>spring-aspects</artifactId>-->
168+
<!-- </dependency>-->
169+
<!-- <dependency>-->
166170
<!-- <groupId>com.github.gavlyukovskiy</groupId>-->
167171
<!-- <artifactId>p6spy-spring-boot-starter</artifactId>-->
168172
<!-- <version>1.6.1</version>-->
169173
<!-- </dependency>-->
170-
171174
</dependencies>
172175

173176
<build>
177+
<!-- <sourceDirectory>${project.build.directory}/generated-sources/delombok</sourceDirectory>-->
174178
<resources>
175179
<resource>
176180
<directory>src/main/java</directory>
@@ -197,7 +201,46 @@
197201
</mainClass>
198202
</configuration>
199203
</plugin>
200-
204+
<!-- <plugin>-->
205+
<!-- <groupId>org.projectlombok</groupId>-->
206+
<!-- <artifactId>lombok-maven-plugin</artifactId>-->
207+
<!-- <version>1.18.0.0</version>-->
208+
<!-- <executions>-->
209+
<!-- <execution>-->
210+
<!-- <phase>generate-sources</phase>-->
211+
<!-- <goals>-->
212+
<!-- <goal>delombok</goal>-->
213+
<!-- </goals>-->
214+
<!-- </execution>-->
215+
<!-- </executions>-->
216+
<!-- <configuration>-->
217+
<!-- <addOutputDirectory>false</addOutputDirectory>-->
218+
<!-- <sourceDirectory>src/main/java</sourceDirectory>-->
219+
<!-- </configuration>-->
220+
<!-- </plugin>-->
221+
<!-- <plugin>-->
222+
<!-- <groupId>org.codehaus.mojo</groupId>-->
223+
<!-- <artifactId>aspectj-maven-plugin</artifactId>-->
224+
<!-- <version>1.10</version>-->
225+
<!-- <configuration>-->
226+
<!-- <complianceLevel>1.8</complianceLevel>-->
227+
<!-- <source>1.8</source>-->
228+
<!-- <aspectLibraries>-->
229+
<!-- <aspectLibrary>-->
230+
<!-- <groupId>org.springframework</groupId>-->
231+
<!-- <artifactId>spring-aspects</artifactId>-->
232+
<!-- </aspectLibrary>-->
233+
<!-- </aspectLibraries>-->
234+
<!-- </configuration>-->
235+
<!-- <executions>-->
236+
<!-- <execution>-->
237+
<!-- <goals>-->
238+
<!-- <goal>compile</goal>-->
239+
<!-- <goal>test-compile</goal>-->
240+
<!-- </goals>-->
241+
<!-- </execution>-->
242+
<!-- </executions>-->
243+
<!-- </plugin>-->
201244
</plugins>
202245
</build>
203246
<repositories>

src/main/java/org/geekbang/time/commonmistakes/transaction/transactionproxyfailed/CommonMistakesApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66

77
@SpringBootApplication
8+
//@EnableTransactionManagement(mode = AdviceMode.ASPECTJ)
89
public class CommonMistakesApplication {
910

1011
public static void main(String[] args) {

0 commit comments

Comments
 (0)