DATACMNS-977 - Added @Indexed to core annotations and types to be indexed for component scanning.

Equipped @Persistent, @RepositoryDefinition and our Repository marker interface with @Indexed so that Spring 5's annotation processor will detect types annotated with or extending the aforementioned type for inclusion in the component index.

Related ticket: SPR-11890.
This commit is contained in:
Oliver Gierke
2017-01-18 19:12:47 +01:00
parent db17a28238
commit 74426c01e1
3 changed files with 32 additions and 6 deletions

View File

@@ -1,11 +1,11 @@
/*
* Copyright (c) 2011 by the original author(s).
* Copyright 2011-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.annotation;
import java.lang.annotation.ElementType;
@@ -21,10 +20,16 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.stereotype.Indexed;
/**
* @author J. Brisbin <jbrisbin@vmware.com>
* Annotation to generally identify persistent types, fields and parameters.
*
* @author Jon Brisbin
* @author Oliver Gierke
*/
@Indexed
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE, ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.PARAMETER })
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.PARAMETER })
public @interface Persistent {
}