title: Spring Oauth2 JDBC Client configuration add same client multiple times
body: <p>I am configuring an OAuth2 authorization server in a Spring project. Here is configuration. </p>
  
  <pre><code> @Override
  public void configure(ClientDetailsServiceConfigurer clients) 
    throws Exception {
      clients.jdbc(dataSource)
             .withClient("user")
             .secret("secret")
             .scopes("read", "write")
             .autoApprove(true)
             .authorizedGrantTypes(
              "password","authorization_code", "refresh_token")
          }
  </code></pre>
  
  <p>The problem is that each time I restart application, it tries to add those clients in database, which I don't want. I am getting the unique constraint violation exception. How can I configure it to only add the clients only if they not already exists?</p>
  
  <p>Thanks.</p>