Skip to content

Commit 18dcf31

Browse files
committed
Polish documentation formatting
1 parent b8d1fe3 commit 18dcf31

File tree

4 files changed

+87
-87
lines changed

4 files changed

+87
-87
lines changed

spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ buildscript {
545545
}
546546
547547
springBoot {
548-
layoutFactory = new com.example.CustomLayoutFactory()
548+
layoutFactory = new com.example.CustomLayoutFactory()
549549
}
550550
----
551551

spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,12 @@ element):
177177

178178
[source,xml,indent=0]
179179
----
180-
<resources>
181-
<resource>
182-
<directory>src/main/resources</directory>
183-
<filtering>true</filtering>
184-
</resource>
185-
</resources>
180+
<resources>
181+
<resource>
182+
<directory>src/main/resources</directory>
183+
<filtering>true</filtering>
184+
</resource>
185+
</resources>
186186
----
187187

188188
and (inside `<plugins/>`):

spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,19 +1236,19 @@ Example:
12361236

12371237
[source,java,indent=0]
12381238
----
1239-
@Bean
1240-
@ExportMetricWriter
1241-
MetricWriter metricWriter(MetricExportProperties export) {
1242-
return new RedisMetricRepository(connectionFactory,
1243-
export.getRedis().getPrefix(), export.getRedis().getKey());
1244-
}
1239+
@Bean
1240+
@ExportMetricWriter
1241+
MetricWriter metricWriter(MetricExportProperties export) {
1242+
return new RedisMetricRepository(connectionFactory,
1243+
export.getRedis().getPrefix(), export.getRedis().getKey());
1244+
}
12451245
----
12461246

12471247
.application.properties
1248-
[source,properties]
1248+
[source,properties,indent=0]
12491249
----
1250-
spring.metrics.export.redis.prefix: metrics.mysystem.${spring.application.name:application}.${random.value:0000}
1251-
spring.metrics.export.redis.key: keys.metrics.mysystem
1250+
spring.metrics.export.redis.prefix: metrics.mysystem.${spring.application.name:application}.${random.value:0000}
1251+
spring.metrics.export.redis.key: keys.metrics.mysystem
12521252
----
12531253

12541254
The prefix is constructed with the application name and id at the end, so it can easily be used
@@ -1287,21 +1287,21 @@ Example:
12871287

12881288
[source,indent=0]
12891289
----
1290-
curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
1291-
[
1292-
{
1293-
"metric": "counter.status.200.root",
1294-
"tags": {
1295-
"domain": "org.springframework.metrics",
1296-
"process": "b968a76"
1297-
},
1298-
"aggregateTags": [],
1299-
"dps": {
1300-
"1430492872": 2,
1301-
"1430492875": 6
1290+
curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
1291+
[
1292+
{
1293+
"metric": "counter.status.200.root",
1294+
"tags": {
1295+
"domain": "org.springframework.metrics",
1296+
"process": "b968a76"
1297+
},
1298+
"aggregateTags": [],
1299+
"dps": {
1300+
"1430492872": 2,
1301+
"1430492875": 6
1302+
}
13021303
}
1303-
}
1304-
]
1304+
]
13051305
----
13061306

13071307

@@ -1320,14 +1320,14 @@ Alternatively, you can provide a `@Bean` of type `StatsdMetricWriter` and mark i
13201320

13211321
[source,java,indent=0]
13221322
----
1323-
@Value("${spring.application.name:application}.${random.value:0000}")
1324-
private String prefix = "metrics";
1323+
@Value("${spring.application.name:application}.${random.value:0000}")
1324+
private String prefix = "metrics";
13251325
1326-
@Bean
1327-
@ExportMetricWriter
1328-
MetricWriter metricWriter() {
1329-
return new StatsdMetricWriter(prefix, "localhost", 8125);
1330-
}
1326+
@Bean
1327+
@ExportMetricWriter
1328+
MetricWriter metricWriter() {
1329+
return new StatsdMetricWriter(prefix, "localhost", 8125);
1330+
}
13311331
----
13321332

13331333

@@ -1343,11 +1343,11 @@ Example:
13431343

13441344
[source,java,indent=0]
13451345
----
1346-
@Bean
1347-
@ExportMetricWriter
1348-
MetricWriter metricWriter(MBeanExporter exporter) {
1349-
return new JmxMetricWriter(exporter);
1350-
}
1346+
@Bean
1347+
@ExportMetricWriter
1348+
MetricWriter metricWriter(MBeanExporter exporter) {
1349+
return new JmxMetricWriter(exporter);
1350+
}
13511351
----
13521352

13531353
Each metric is exported as an individual MBean. The format for the `ObjectNames` is given
@@ -1374,24 +1374,24 @@ Example:
13741374

13751375
[source,java,indent=0]
13761376
----
1377-
@Autowired
1378-
private MetricExportProperties export;
1377+
@Autowired
1378+
private MetricExportProperties export;
13791379
1380-
@Bean
1381-
public PublicMetrics metricsAggregate() {
1382-
return new MetricReaderPublicMetrics(aggregatesMetricReader());
1383-
}
1380+
@Bean
1381+
public PublicMetrics metricsAggregate() {
1382+
return new MetricReaderPublicMetrics(aggregatesMetricReader());
1383+
}
13841384
1385-
private MetricReader globalMetricsForAggregation() {
1386-
return new RedisMetricRepository(this.connectionFactory,
1387-
this.export.getRedis().getAggregatePrefix(), this.export.getRedis().getKey());
1388-
}
1385+
private MetricReader globalMetricsForAggregation() {
1386+
return new RedisMetricRepository(this.connectionFactory,
1387+
this.export.getRedis().getAggregatePrefix(), this.export.getRedis().getKey());
1388+
}
13891389
1390-
private MetricReader aggregatesMetricReader() {
1391-
AggregateMetricReader repository = new AggregateMetricReader(
1392-
globalMetricsForAggregation());
1393-
return repository;
1394-
}
1390+
private MetricReader aggregatesMetricReader() {
1391+
AggregateMetricReader repository = new AggregateMetricReader(
1392+
globalMetricsForAggregation());
1393+
return repository;
1394+
}
13951395
----
13961396

13971397
NOTE: The example above uses `MetricExportProperties` to inject and extract the key and
@@ -1455,34 +1455,34 @@ and obtain basic information about the last 100 requests:
14551455

14561456
[source,json,indent=0]
14571457
----
1458-
[{
1459-
"timestamp": 1394343677415,
1460-
"info": {
1461-
"method": "GET",
1462-
"path": "/trace",
1463-
"headers": {
1464-
"request": {
1465-
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
1466-
"Connection": "keep-alive",
1467-
"Accept-Encoding": "gzip, deflate",
1468-
"User-Agent": "Mozilla/5.0 Gecko/Firefox",
1469-
"Accept-Language": "en-US,en;q=0.5",
1470-
"Cookie": "_ga=GA1.1.827067509.1390890128; ..."
1471-
"Authorization": "Basic ...",
1472-
"Host": "localhost:8080"
1473-
},
1474-
"response": {
1475-
"Strict-Transport-Security": "max-age=31536000 ; includeSubDomains",
1476-
"X-Application-Context": "application:8080",
1477-
"Content-Type": "application/json;charset=UTF-8",
1478-
"status": "200"
1479-
}
1480-
}
1481-
}
1482-
},{
1483-
"timestamp": 1394343684465,
1484-
...
1485-
}]
1458+
[{
1459+
"timestamp": 1394343677415,
1460+
"info": {
1461+
"method": "GET",
1462+
"path": "/trace",
1463+
"headers": {
1464+
"request": {
1465+
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
1466+
"Connection": "keep-alive",
1467+
"Accept-Encoding": "gzip, deflate",
1468+
"User-Agent": "Mozilla/5.0 Gecko/Firefox",
1469+
"Accept-Language": "en-US,en;q=0.5",
1470+
"Cookie": "_ga=GA1.1.827067509.1390890128; ..."
1471+
"Authorization": "Basic ...",
1472+
"Host": "localhost:8080"
1473+
},
1474+
"response": {
1475+
"Strict-Transport-Security": "max-age=31536000 ; includeSubDomains",
1476+
"X-Application-Context": "application:8080",
1477+
"Content-Type": "application/json;charset=UTF-8",
1478+
"status": "200"
1479+
}
1480+
}
1481+
}
1482+
},{
1483+
"timestamp": 1394343684465,
1484+
...
1485+
}]
14861486
----
14871487

14881488

spring-boot-docs/src/main/asciidoc/using-spring-boot.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,8 @@ Cloud Foundry you can add the following to your `manifest.yml`:
11231123
[source,yaml,indent=0]
11241124
----
11251125
---
1126-
env:
1127-
JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n"
1126+
env:
1127+
JAVA_OPTS: "-Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n"
11281128
----
11291129

11301130
TIP: Notice that you don't need to pass an `address=NNNN` option to `-Xrunjdwp`. If

0 commit comments

Comments
 (0)