Merge pull request #12949 from panos-kakos/JAVA-15588
[JAVA-15588] Moved code from spring-di to spring-boot-di
This commit is contained in:
commit
6ba4332f87
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.componentscan.filter.aspectj;
|
||||
|
||||
public class Loin {
|
||||
public class Lion {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.componentscan.filter.custom;
|
||||
|
||||
public class Loin {
|
||||
public class Lion {
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.componentscan.filter.regex;
|
||||
|
||||
public class Loin {
|
||||
public class Lion {
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package com.baeldung.componentscan.filter.annotation;
|
||||
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ComponentScanAnnotationFilterApp.class)
|
|
@ -1,6 +1,5 @@
|
|||
package com.baeldung.componentscan.filter.aspectj;
|
||||
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ComponentScanAspectJFilterApp.class)
|
|
@ -1,6 +1,5 @@
|
|||
package com.baeldung.componentscan.filter.assignable;
|
||||
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ComponentScanAssignableTypeFilterApp.class)
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ComponentScanCustomFilterApp.class)
|
|
@ -1,6 +1,5 @@
|
|||
package com.baeldung.componentscan.filter.regex;
|
||||
|
||||
import static org.junit.Assert.assertThat;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -13,6 +12,7 @@ import org.springframework.context.ApplicationContext;
|
|||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ComponentScanRegexFilterApp.class)
|
|
@ -1,11 +0,0 @@
|
|||
package com.baeldung.componentscan.filter.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface Animal {
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
package com.baeldung.componentscan.filter.annotation;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.FilterType;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(includeFilters = @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Animal.class))
|
||||
public class ComponentScanAnnotationFilterApp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package com.baeldung.componentscan.filter.annotation;
|
||||
|
||||
@Animal
|
||||
public class Elephant {
|
||||
}
|
Loading…
Reference in New Issue