@Ray is right. But the domain is hidden.
https://stackoverflow.com/a/74261128/20325718

If you also want to display the domain, you can try the following method.
@Configuration
public class OpenAPIDefinitionConfiguration {
@Component
@Profile("prd")
@OpenAPIDefinition(servers = @Server(url = "https://example.com"))
public static class PrdOpenAPIDefinitionConfiguration {
}
@Component
@Profile("local")
@OpenAPIDefinition(servers = @Server(url = "https://local.example.com"))
public static class LocalOpenAPIDefinitionConfiguration {
}
}
application.properties
spring.profiles.active=prd
Or if you want to display all environments, you can also display it by the following method.
@OpenAPIDefinition(
servers = {
@Server(
url = "https://{profile}.example.com/",
variables = {
@ServerVariable(
name = "profile",
allowableValues = { "prd", "local" },
defaultValue = "prd"
)
}
)
}
)