This commit is contained in:
Phillip Webb 2016-12-19 13:12:03 -08:00
parent 6121208cbb
commit d15f3548be
2 changed files with 17 additions and 5 deletions

View File

@ -101,7 +101,6 @@ public class CloudFoundryActuatorAutoConfiguration {
/**
* Nested configuration for ignored requests if Spring Security is present.
*
*/
@ConditionalOnClass(WebSecurity.class)
static class CloudFoundryIgnoredRequestConfiguration {

View File

@ -73,11 +73,24 @@ public class SpringPhysicalNamingStrategy implements PhysicalNamingStrategy {
builder.insert(i++, '_');
}
}
return getIdentifier(builder.toString(), name.isQuoted(), jdbcEnvironment);
}
String text = builder.toString();
String finalText = isCaseInsensitive(jdbcEnvironment)
? text.toLowerCase(Locale.ROOT) : text;
return new Identifier(finalText, name.isQuoted());
/**
* Get an the identifier for the specified details. By default his method will return
* an identifier with the name adapted based on the result of
* {@link #isCaseInsensitive(JdbcEnvironment)}
* @param name the name of the identifier
* @param quoted if the identifier is quoted
* @param jdbcEnvironment the JDBC environment
* @return an identifier instance
*/
protected Identifier getIdentifier(String name, boolean quoted,
JdbcEnvironment jdbcEnvironment) {
if (isCaseInsensitive(jdbcEnvironment)) {
name = name.toLowerCase(Locale.ROOT);
}
return new Identifier(name, quoted);
}
/**