File tree 1 file changed +9
-4
lines changed
spring-context/src/main/java/org/springframework/context/annotation
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2017 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.
357
357
* <h2>Constraints when authoring {@code @Configuration} classes</h2>
358
358
*
359
359
* <ul>
360
- * <li>@Configuration classes must be non-final
361
- * <li>@Configuration classes must be non-local (may not be declared within a method)
362
- * <li>Any nested configuration classes must be {@code static}.
360
+ * <li>Configuration classes must be provided as classes (i.e. not as instances returned
361
+ * from factory methods), allowing for runtime enhancements through a generated subclass.
362
+ * <li>Configuration classes must be non-final.
363
+ * <li>Configuration classes must be non-local (i.e. may not be declared within a method).
364
+ * <li>Any nested configuration classes must be declared as {@code static}.
365
+ * <li>{@code @Bean} methods may not in turn create further configuration classes
366
+ * (any such instances will be treated as regular beans, with their configuration
367
+ * annotations remaining undetected).
363
368
* </ul>
364
369
*
365
370
* @author Rod Johnson
You can’t perform that action at this time.
0 commit comments