title: Spring Security SAML2 no entityID is found
body: <p>I'm working to get my Spring Boot (v. 2.0.1) application working with an SSO provider.  When I try to hit the login page, I get the following error:</p>
  
  <blockquote>
    <p>No hosted service provider is configured and no alias was selected</p>
  </blockquote>
  
  <p>and when I try to hit the discovery page, I get the following error:</p>
  
  <blockquote>
    <p>Entity ID parameter must be specified</p>
  </blockquote>
  
  <p>Both appear to be because of a missing entityID.  It's not clear to me if it's the SP or IDP entityID that's missing.  My application is setting the entityId in a bean as such:</p>
  
  <pre><code>@Bean
  fun metadataGenerator():MetadataGenerator {
      val metadataGenerator = MetadataGenerator()
      metadataGenerator.entityId = "my:custom:entity:id"
      metadataGenerator.extendedMetadata = extendedMetadata()
      metadataGenerator.isIncludeDiscoveryExtension = true
      metadataGenerator.setKeyManager(keyManager())
      return metadataGenerator
  }
  </code></pre>
  
  <p>And the IDP's metadata XML is being read (I can see it getting parsed at one point during start up) and contains an entityID.</p>
  
  <p>Somewhere along the way, some entityID is getting lost and creating these errors.  I can't seem to track down how that's happening.</p>