mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Remove hard coded bean names for couple of @ConfigurationProperties beans
This commit is contained in:
parent
a26ae0a303
commit
efe8494f46
@ -38,14 +38,14 @@ import org.springframework.context.annotation.Configuration;
|
||||
@EnableConfigurationProperties
|
||||
public class ManagementServerPropertiesAutoConfiguration {
|
||||
|
||||
@Bean(name = "org.springframework.actuate.properties.ManagementServerProperties")
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public ManagementServerProperties managementServerProperties() {
|
||||
return new ManagementServerProperties();
|
||||
}
|
||||
|
||||
// In case security auto configuration hasn't been included
|
||||
@Bean(name = "org.springframework.autoconfigure.security.SecurityProperties")
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
@ConditionalOnClass(name = "org.springframework.security.config.annotation.web.configuration.EnableWebSecurity")
|
||||
public SecurityProperties securityProperties() {
|
||||
|
@ -37,7 +37,7 @@ import org.springframework.security.authentication.AuthenticationManager;
|
||||
AuthenticationManagerConfiguration.class })
|
||||
public class SecurityAutoConfiguration {
|
||||
|
||||
@Bean(name = "org.springframework.autoconfigure.security.SecurityProperties")
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public SecurityProperties securityProperties() {
|
||||
return new SecurityProperties();
|
||||
|
@ -46,7 +46,7 @@ public class ServerPropertiesAutoConfiguration implements ApplicationContextAwar
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Bean(name = "org.springframework.boot.autoconfigure.web.ServerProperties")
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(search = SearchStrategy.CURRENT)
|
||||
public ServerProperties serverProperties() {
|
||||
return new ServerProperties();
|
||||
|
Loading…
Reference in New Issue
Block a user