parent
f91b53747a
commit
de01e7aad4
|
|
@ -71,7 +71,7 @@ public class HibernateMetricsAutoConfiguration {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the name of a {@link EntityManagerFactory} based on its {@code beanName}.
|
||||
* Get the name of an {@link EntityManagerFactory} based on its {@code beanName}.
|
||||
* @param beanName the name of the {@link EntityManagerFactory} bean
|
||||
* @return a name for the given entity manager factory
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Auto-configuration for JDBC metrics.
|
||||
* Auto-configuration for JPA metrics.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.metrics.orm.jpa;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public class HibernateMetricsAutoConfigurationTests {
|
|||
.withUserConfiguration(
|
||||
NonHibernateEntityManagerFactoryConfiguration.class)
|
||||
.run((context) -> {
|
||||
// ensure EntityManagerFactory is not an Hibernate SessionFactory
|
||||
// ensure EntityManagerFactory is not a Hibernate SessionFactory
|
||||
assertThatThrownBy(() -> context.getBean(EntityManagerFactory.class)
|
||||
.unwrap(SessionFactory.class))
|
||||
.isInstanceOf(PersistenceException.class);
|
||||
|
|
@ -178,9 +178,8 @@ public class HibernateMetricsAutoConfigurationTests {
|
|||
DataSource ds) {
|
||||
Map<String, String> jpaProperties = new HashMap<>();
|
||||
jpaProperties.put("hibernate.generate_statistics", "true");
|
||||
EntityManagerFactoryBuilder builder = new EntityManagerFactoryBuilder(
|
||||
new HibernateJpaVendorAdapter(), jpaProperties, null);
|
||||
return builder.dataSource(ds).packages(PACKAGE_CLASSES).build();
|
||||
return new EntityManagerFactoryBuilder(new HibernateJpaVendorAdapter(),
|
||||
jpaProperties, null).dataSource(ds).packages(PACKAGE_CLASSES).build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class HealthWebEndpointResponseMapperTests {
|
|||
|
||||
private final HealthStatusHttpMapper statusHttpMapper = new HealthStatusHttpMapper();
|
||||
|
||||
private Set<String> autorizedRoles = Collections.singleton("ACTUATOR");
|
||||
private Set<String> authorizedRoles = Collections.singleton("ACTUATOR");
|
||||
|
||||
@Test
|
||||
public void mapDetailsWithDisableDetailsDoesNotInvokeSupplier() {
|
||||
|
|
@ -122,7 +122,7 @@ public class HealthWebEndpointResponseMapperTests {
|
|||
|
||||
private HealthWebEndpointResponseMapper createMapper(ShowDetails showDetails) {
|
||||
return new HealthWebEndpointResponseMapper(this.statusHttpMapper, showDetails,
|
||||
this.autorizedRoles);
|
||||
this.authorizedRoles);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1809,7 +1809,7 @@ Auto-configuration enables the instrumentation of all available Hibernate
|
|||
Metrics are also tagged by the name of the `EntityManagerFactory` that is derived from
|
||||
the bean name.
|
||||
|
||||
To enable statistics, the standardJPA property `hibernate.generate_statistics` must be
|
||||
To enable statistics, the standard JPA property `hibernate.generate_statistics` must be
|
||||
set to `true`. You can enable that on the auto-configured `EntityManagerFactory` as shown
|
||||
in the following example:
|
||||
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
|
|||
|
||||
/**
|
||||
* Resolve the environment variables to use.
|
||||
* @return a {@link EnvVariables} defining the environment variables
|
||||
* @return an {@link EnvVariables} defining the environment variables
|
||||
*/
|
||||
protected EnvVariables resolveEnvVariables() {
|
||||
return new EnvVariables(this.environmentVariables);
|
||||
|
|
|
|||
Loading…
Reference in New Issue