Rework EndpointWebMvcAutoConfiguration port logic

Update the `ManagementServerPort` detection logic to attempt direct
property resolution before looking for a local property bean
definition. Bean definitions provided by auto-configuration classes
are ignored.

This change allow `OnManagementMvcCondition` to use the
`ManagementServerPort` to determine when `EndpointWebMvcConfiguration`
should apply (removing the need to create a temporary context).

See gh-3345
This commit is contained in:
Phillip Webb
2015-07-07 14:07:32 -07:00
parent e885dab752
commit b2fcd77d93
3 changed files with 98 additions and 113 deletions

View File

@@ -48,7 +48,7 @@ import org.springframework.util.Assert;
* @author Stephane Nicoll
* @see EnableAutoConfiguration
*/
@Order(Ordered.LOWEST_PRECEDENCE)
@Order(Ordered.LOWEST_PRECEDENCE - 1)
class EnableAutoConfigurationImportSelector implements DeferredImportSelector,
BeanClassLoaderAware, ResourceLoaderAware, BeanFactoryAware {