|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2013 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
16 | 16 |
|
17 | 17 | package org.springframework.context.annotation;
|
18 | 18 |
|
| 19 | +import java.lang.annotation.Documented; |
19 | 20 | import java.lang.annotation.ElementType;
|
20 | 21 | import java.lang.annotation.Retention;
|
21 | 22 | import java.lang.annotation.RetentionPolicy;
|
|
44 | 45 | *
|
45 | 46 | * <p>If a {@code @Configuration} class is marked with {@code @Profile}, all of the
|
46 | 47 | * {@code @Bean} methods and {@link Import @Import} annotations associated with that class
|
47 |
| - * will be bypassed unless one or more the specified profiles are active. This is very |
| 48 | + * will be bypassed unless one or more of the specified profiles are active. This is very |
48 | 49 | * similar to the behavior in Spring XML: if the {@code profile} attribute of the
|
49 | 50 | * {@code beans} element is supplied e.g., {@code <beans profile="p1,p2">}, the
|
50 | 51 | * {@code beans} element will not be parsed unless profiles 'p1' and/or 'p2' have been
|
51 |
| - * activated. Likewise, if a {@code @Component} or {@code @Configuration} class is marked |
| 52 | + * activated. Likewise, if a {@code @Component} or {@code @Configuration} class is marked |
52 | 53 | * with {@code @Profile({"p1", "p2"})}, that class will not be registered/processed unless
|
53 | 54 | * profiles 'p1' and/or 'p2' have been activated.
|
54 | 55 | *
|
|
73 | 74 | */
|
74 | 75 | @Retention(RetentionPolicy.RUNTIME)
|
75 | 76 | @Target(ElementType.TYPE)
|
| 77 | +@Documented |
76 | 78 | public @interface Profile {
|
77 | 79 |
|
78 | 80 | /**
|
79 |
| - * The set of profiles for which this component should be registered. |
| 81 | + * The set of profiles for which the annotated component should be registered. |
80 | 82 | */
|
81 | 83 | String[] value();
|
82 | 84 |
|
|
0 commit comments