Use convention based code imports
Closes gh-29647
This commit is contained in:
@@ -3,10 +3,7 @@
|
||||
Spring Profiles provide a way to segregate parts of your application configuration and make it be available only in certain environments.
|
||||
Any `@Component`, `@Configuration` or `@ConfigurationProperties` can be marked with `@Profile` to limit when it is loaded, as shown in the following example:
|
||||
|
||||
[source,java,indent=0]
|
||||
----
|
||||
include::{docs-java}/features/profiles/ProductionConfiguration.java[]
|
||||
----
|
||||
include::code:ProductionConfiguration[]
|
||||
|
||||
NOTE: If `@ConfigurationProperties` beans are registered through `@EnableConfigurationProperties` instead of automatic scanning, the `@Profile` annotation needs to be specified on the `@Configuration` class that has the `@EnableConfigurationProperties` annotation.
|
||||
In the case where `@ConfigurationProperties` are scanned, `@Profile` can be specified on the `@ConfigurationProperties` class itself.
|
||||
|
||||
Reference in New Issue
Block a user