title: Spring security Oauth2 Redirect URI setting is ignored when using application.properties
body: <p>I am configuring multiple authentication clients for a spring-boot application, and am attempting to override the default redirect URI using:</p>
  <pre><code>spring.security.oauth2.client.registration.google.redirectUri={baseUrl}/oauth2/callback/{registrationId}
  </code></pre>
  <p>and then setting the following in SecurityConfig:</p>
  <pre><code>http.oauth2Login()
  .authorizationEndpoint().baseUri(&quot;/oauth2/authorize&quot;)
  .and()
  .redirectionEndpoint().baseUri(&quot;/oauth2/callback/*&quot;)
  </code></pre>
  <p>However, this is not working - when accessing {baseUrl}/oauth2/authorize/google, the client is redirected to</p>
  <pre><code>https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount
      ?response_type=code
        &amp;client_id&lt;clientId&gt;
        &amp;scope=email%20profile
        &amp;redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Flogin%2Foauth2%2Fcode%2Fgoogle
        &amp;flowName=GeneralOAuthFlow
  </code></pre>
  <p>with redirect uri parameter &quot;{baseUrl}/login/oauth2/code/google&quot; which is the default set by spring security when redirectUri is not set. If I switch to using application.yml with the below configuration:</p>
  <pre><code>spring:
      security:
        oauth2:
          client:
            registration:
              google:    
                redirectUri: &quot;{baseUrl}/oauth2/callback/{registrationId}&quot;
  </code></pre>
  <p>it works fine. However, for various reasons I want to stick with the application.properties format. Any idea why the setting is ignored?</p>