I know how to create custom annotation. But i am unable to understand how does it work internally. If i take example of spring annontation.
@PropertySource(value = { "classpath:database.properties" }).
if we see internal details of @PropertySource annotation
@Target({ java.lang.annotation.ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Repeatable(PropertySources.class)
public @interface PropertySource {
public abstract String name();
public abstract String[] value();
public abstract boolean ignoreResourceNotFound();
}
We do not have provided any implementation here for loading property file. Then How is it loading property file from classpath. Who is working behind the scene ?