Change introduced in #7231 need to expose method `getPort()` More context in [this comment](https://github.com/spring-projects/spring-security/pull/7231#discussion_r312159058)