Move code to right package (#8285)
* Move code to rigth package * Move code to correct module
This commit is contained in:
parent
6fa8976efc
commit
996e96aae3
|
@ -0,0 +1,11 @@
|
||||||
|
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 {
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
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) {
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.componentscan.filter.annotation;
|
||||||
|
|
||||||
|
@Animal
|
||||||
|
public class Elephant {
|
||||||
|
}
|
Loading…
Reference in New Issue