title: SpringPhysicalNamingStrategy with configurable suffix
body: <p>We would like to accomplish a double run setup  in which our application writes data in a table of which the table name is a composition of the JPA-configured table name and an arbitrary affix.</p>
  
  <p>Our application uses Spring Boot with Spring ORM backed by Hibernate.</p>
  
  <p>The suffix should be easily configurable, ideally via Spring Boot's externalized configuration.</p>
  
  <p>Following is our SpringPhysicalNamingStrategy implementation that appends the suffix to table name. The suffix is currently hardcoded.</p>
  
  <pre><code>import org.hibernate.boot.model.naming.Identifier;
  import org.hibernate.boot.model.naming.PhysicalNamingStrategy;
  import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
  import org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy;
  import org.springframework.stereotype.Component;
  
  import java.util.HashSet;
  import java.util.Set;
  
  import static java.util.Arrays.asList;
  
  @Component
  public class DoubleRunPhysicalNamingStrategy extends SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
  
      private Set&lt;String&gt; tableNames = new HashSet&lt;&gt;(asList("AR", "AP"));
  
      private String suffix = "_2";
  
      @Override
      public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment jdbcEnvironment) {
          Identifier identifier =
                  super.toPhysicalTableName(name, jdbcEnvironment);
  
          if (tableNames.contains(identifier.getText().toUpperCase())) {
              return new Identifier(String.format("%s%s", identifier.getText(), suffix), identifier.isQuoted());
          }
  
          return identifier;
      }
  
  }
  </code></pre>
  
  <p>Finally, above physical naming strategy is configured via following application property:
      spring.jpa.hibernate.naming.physical-strategy=DoubleRunPhysicalNamingStrategy</p>
  
  <p>We tried using @Value and another component via @Autowired to make the suffix configurable but without luck. Both are not wired and stay unassigned.</p>
  
  <p>Any advice on how to accomplish this?</p>