Convert remaining samples to use random port
Partial fix for gh-337. See also gh-607 which complements this, but might conflict on a merge.
This commit is contained in:
@@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.security.SecurityProperties;
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties;
|
||||
import org.springframework.boot.autoconfigure.web.ServerPropertiesAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@@ -51,4 +52,11 @@ public class ManagementServerPropertiesAutoConfiguration {
|
||||
return new SecurityProperties();
|
||||
}
|
||||
|
||||
// In case server auto configuration hasn't been included
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public ServerProperties serverProperties() {
|
||||
return new ServerProperties();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user