Merge pull request #4309 from izeye/polish-20151027

* pr/4309:
  Polish contribution
  Polish docs
pull/4311/merge
Stephane Nicoll 9 years ago
commit 0f550dfce7

@ -142,7 +142,7 @@ public class JacksonAutoConfiguration {
@Bean
@ConditionalOnMissingBean(ParameterNamesModule.class)
public ParameterNamesModule parametersNameModule() {
public ParameterNamesModule parameterNamesModule() {
return new ParameterNamesModule(JsonCreator.Mode.PROPERTIES);
}

@ -35,8 +35,8 @@ import org.springframework.security.config.annotation.web.configuration.WebSecur
* {@link AuthenticationManager} based on configuration bound to a
* {@link SecurityProperties} bean. There is one user (named "user") whose password is
* random and printed on the console at INFO level during startup. In a webapp this
* configuration also secures all web endpoints (except some well-known static resource)
* locations with HTTP basic security. To replace all the default behaviour in a webapp
* configuration also secures all web endpoints (except some well-known static resource
* locations) with HTTP basic security. To replace all the default behaviours in a webapp
* provide a {@code @Configuration} with {@code @EnableWebSecurity}. To just add your own
* layer of application security in front of the defaults, add a {@code @Configuration} of
* type {@link WebSecurityConfigurerAdapter}.

@ -137,7 +137,7 @@ public class MixedMongoRepositoriesAutoConfigurationTests {
}
// In this one the Jpa repositories and the autoconfiguration packages overlap, so
// In this one the Jpa repositories and the auto-configuration packages overlap, so
// Mongo will try and configure the same repositories
@Configuration
@TestAutoConfigurationPackage(CityRepository.class)

@ -40,7 +40,7 @@ rules of thumb:
* Look for classes called `+*AutoConfiguration+` and read their sources, in particular the
`+@Conditional*+` annotations to find out what features they enable and when. Add
`--debug` to the command line or a System property `-Ddebug` to get a log on the
console of all the autoconfiguration decisions that were made in your app. In a running
console of all the auto-configuration decisions that were made in your app. In a running
Actuator app look at the `autoconfig` endpoint ('`/autoconfig`' or the JMX equivalent) for
the same information.
* Look for classes that are `@ConfigurationProperties` (e.g.
@ -1810,8 +1810,8 @@ authentication manager is needed elsewhere), e.g.
----
@Configuration
public class AuthenticationManagerConfiguration extends
GlobalAuthenticationConfigurerAdapter {
GlobalAuthenticationConfigurerAdapter {
@Override
public void init(AuthenticationManagerBuilder auth) {
auth.inMemoryAuthentication() // ... etc.

@ -521,7 +521,7 @@ changes the default resource path for the MVC endpoint. Legal endpoint ids are c
only of alphanumeric characters (because they can be exposed in a number of places,
including JMX object names, where special characters are forbidden). The MVC path can be
changed separately by configuring `endpoints.{name}.path`, and there is no validation on
those values (so you can use anything that is legel in a URL path). For example, to change
those values (so you can use anything that is legal in a URL path). For example, to change
the location of the `/health` endpoint to `/ping/me` you can set
`endpoints.health.path=/ping/me`.
@ -905,7 +905,7 @@ endpoint you should see a response similar to this:
Here we can see basic `memory`, `heap`, `class loading`, `processor` and `thread pool`
information along with some HTTP metrics. In this instance the `root` ('`/`') and `/metrics`
URLs have returned `HTTP 200` responses `20` and `3` times respectively. It also appears
that the `root` URL returned `HTTP 401` (unauthorized) `4` times. The double asterix (`star-star`)
that the `root` URL returned `HTTP 401` (unauthorized) `4` times. The double asterisks (`star-star`)
comes from a request matched by Spring MVC as `+/**+` (normally a static resource).
The `gauge` shows the last response time for a request. So the last request to `root` took
@ -1136,11 +1136,11 @@ recommendations.
[[production-ready-metric-writers-export-to-open-tdsb]]
[[production-ready-metric-writers-export-to-open-tsdb]]
==== Example: Export to Open TSDB
If you provide a `@Bean` of type `OpenTsdbHttpMetricWriter` and mark it
If you provide a `@Bean` of type `OpenTsdbMetricWriter` and mark it
`@ExportMetricWriter` metrics are exported to http://opentsdb.net/[Open TSDB] for
aggregation. The `OpenTsdbHttpMetricWriter` has a `url` property that you need to set
aggregation. The `OpenTsdbMetricWriter` has a `url` property that you need to set
to the Open TSDB "`/put`" endpoint, e.g. `http://localhost:4242/api/put`). It also has a
`namingStrategy` that you can customize or configure to make the metrics match the data
structure you need on the server. By default it just passes through the metric name as an
@ -1201,7 +1201,7 @@ MetricWriter metricWriter() {
[[production-ready-metric-writers-export-to-jmx]]
==== Example: Export to JMX
If you provide a `@Bean` of type `JmxMetricWriter` marked `@ExportMetricWriter` the metrics are exported as MBeans to
the local server (the `MBeanExporter` is provided by Spring Boot JMX autoconfiguration as
the local server (the `MBeanExporter` is provided by Spring Boot JMX auto-configuration as
long as it is switched on). Metrics can then be inspected, graphed, alerted etc. using any
tool that understands JMX (e.g. JConsole or JVisualVM).
@ -1270,7 +1270,6 @@ repositories, and don't want to export their values.
[[production-ready-code-hale-metrics]]
[[production-ready-dropwizard-metrics]]
=== Dropwizard Metrics
A default `MetricRegistry` Spring bean will be created when you declare a dependency to

@ -85,7 +85,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
* to shut down the logging system when the JVM exits.
* @see LoggingSystem#getShutdownHandler
*/
public static final String REGISTER_SHOW_HOOK_PROPERTY = "logging.register-shutdown-hook";
public static final String REGISTER_SHUTDOWN_HOOK_PROPERTY = "logging.register-shutdown-hook";
/**
* The name of the Spring property that contains the path where the logging
@ -332,7 +332,7 @@ public class LoggingApplicationListener implements GenericApplicationListener {
private void registerShutdownHookIfNecessary(Environment environment,
LoggingSystem loggingSystem) {
boolean registerShutdownHook = new RelaxedPropertyResolver(environment)
.getProperty(REGISTER_SHOW_HOOK_PROPERTY, Boolean.class, false);
.getProperty(REGISTER_SHUTDOWN_HOOK_PROPERTY, Boolean.class, false);
if (registerShutdownHook) {
Runnable shutdownHandler = loggingSystem.getShutdownHandler();
if (shutdownHandler != null

@ -73,7 +73,7 @@ public @interface EntityScan {
* <p>
* Consider creating a special no-op marker class or interface in each package that
* serves no purpose other than being referenced by this attribute.
* @return classes form the base packages to scan
* @return classes from the base packages to scan
*/
Class<?>[] basePackageClasses() default {};

Loading…
Cancel
Save