Browse Source
Previously it was possible to bind a bean to the root prefix by just adding `@EnableConfigurationProperties` with the class of said bean. This use case is misleading and prevents any meta-data to be generated for that object since the annotation processor reacts on the presence of the `@ConfigurationProperties` annotation. If a class is included in the list of configuration properties bean to create via the `@EnableConfigurationProperties` annotation we now make sure that the `@configurationProperties` annotation is present on it. Closes gh-3460pull/4334/head
8 changed files with 80 additions and 62 deletions
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
/* |
||||
* Copyright 2012-2013 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
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.boot.context.properties; |
||||
|
||||
/** |
||||
* Properties holder registered by {@link EnableConfigurationPropertiesImportSelector} to |
||||
* be picked up by {@link ConfigurationPropertiesBindingPostProcessor}. |
||||
* |
||||
* @author Dave Syer |
||||
*/ |
||||
class ConfigurationPropertiesHolder { |
||||
|
||||
private final Object target; |
||||
|
||||
ConfigurationPropertiesHolder(Object target) { |
||||
this.target = target; |
||||
} |
||||
|
||||
public Object getTarget() { |
||||
return this.target; |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue