[JAVA-29177 ] - Update Spring-AOP from Boot 2 to Boot 3 (#15560)

This commit is contained in:
Amit Pandey 2024-01-09 01:57:42 +05:30 committed by GitHub
parent 76c9cb1c31
commit 0d48dd5439
8 changed files with 21 additions and 16 deletions

View File

@ -9,9 +9,9 @@
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<artifactId>parent-boot-3</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
<relativePath>../parent-boot-3</relativePath>
</parent>
<dependencies>
@ -27,6 +27,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>

View File

@ -13,7 +13,7 @@ import java.util.logging.Logger;
@Component
public class PerformanceAspect {
private static Logger logger = Logger.getLogger(PerformanceAspect.class.getName());
private static final Logger logger = Logger.getLogger(PerformanceAspect.class.getName());
@Pointcut("within(com.baeldung..*) && execution(* com.baeldung.pointcutadvice.dao.FooDao.*(..))")
public void repositoryClassMethods() {

View File

@ -15,8 +15,8 @@ import java.util.logging.LogRecord;
import java.util.logging.Logger;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest

View File

@ -15,8 +15,8 @@ import java.util.logging.LogRecord;
import java.util.logging.Logger;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest

View File

@ -15,8 +15,8 @@ import java.util.logging.LogRecord;
import java.util.logging.Logger;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest

View File

@ -17,10 +17,10 @@ import java.util.logging.LogRecord;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.core.IsCollectionContaining.hasItem;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.core. IsIterableContaining.hasItem;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {Application.class}, loader = AnnotationConfigContextLoader.class)

View File

@ -18,9 +18,9 @@ import java.util.logging.Logger;
import java.util.regex.Pattern;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {Application.class}, loader = AnnotationConfigContextLoader.class)

View File

@ -17,8 +17,8 @@ import java.util.regex.Pattern;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.hasSize;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/pointcutadvice/beans.xml")