You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-actuator-autoconfigure/src/docs/antora/modules/api/pages/rest/actuator/logfile.adoc
NOTE: Retrieving part of the log file is not supported when using Jersey.
25
25
26
-
To retrieve part of the log file, make a `GET` request to `/actuator/logfile` by using the `Range` header, as shown in the following curl-based example:
26
+
To retrieve part of the log file, make a `GET` request to `/actuator/logfile` by using the `+Range+` header, as shown in the following curl-based example:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/appendix/pages/test-auto-configuration/index.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
[[appendix.test-auto-configuration]]
3
3
= Test Auto-configuration Annotations
4
4
5
-
This appendix describes the `@...Test` auto-configuration annotations that Spring Boot provides to test slices of your application.
5
+
This appendix describes the `+@...Test+` auto-configuration annotations that Spring Boot provides to test slices of your application.
The following table lists the various `@...Test` annotations that can be used to test slices of your application and the auto-configuration that they import by default:
4
+
The following table lists the various `+@...Test+` annotations that can be used to test slices of your application and the auto-configuration that they import by default:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/data-access.adoc
+4-4
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ app:
28
28
pool-size: 30
29
29
----
30
30
31
-
Assuming that `SomeDataSource` has regular JavaBean properties for the URL, the username, and the pool size, these settings are bound automatically before the `DataSource` is made available to other components.
31
+
Assuming that `+SomeDataSource+` has regular JavaBean properties for the URL, the username, and the pool size, these settings are bound automatically before the `DataSource` is made available to other components.
32
32
33
33
Spring Boot also provides a utility builder class, called `DataSourceBuilder`, that can be used to create one of the standard data sources (if it is on the classpath).
34
34
The builder can detect which one to use based on what is available on the classpath.
@@ -243,7 +243,7 @@ Alternatively, if `ImplicitNamingStrategy` or `PhysicalNamingStrategy` beans are
243
243
By default, Spring Boot configures the physical naming strategy with `CamelCaseToUnderscoresNamingStrategy`.
244
244
Using this strategy, all dots are replaced by underscores and camel casing is replaced by underscores as well.
245
245
Additionally, by default, all table names are generated in lower case.
246
-
For example, a `TelephoneNumber` entity is mapped to the `telephone_number` table.
246
+
For example, a `+TelephoneNumber+` entity is mapped to the `telephone_number` table.
247
247
If your schema requires mixed-case identifiers, define a custom `CamelCaseToUnderscoresNamingStrategy` bean, as shown in the following example:
248
248
249
249
include-code::spring/MyHibernateConfiguration[]
@@ -287,7 +287,7 @@ For details, see {url-hibernate-userguide}#caching-provider-jcache[the Hibernate
== Use Dependency Injection in Hibernate Components
289
289
290
-
By default, Spring Boot registers a `BeanContainer` implementation that uses the `BeanFactory` so that converters and entity listeners can use regular dependency injection.
290
+
By default, Spring Boot registers a `org.hibernate.resource.beans.container.spi.BeanContainer` implementation that uses the `BeanFactory` so that converters and entity listeners can use regular dependency injection.
291
291
292
292
You can disable or tune this behavior by registering a `HibernatePropertiesCustomizer` that removes or changes the `hibernate.resource.beans.container` property.
293
293
@@ -311,7 +311,7 @@ You can also reuse `JpaProperties` to bind settings for each `EntityManagerFacto
The example above creates an `EntityManagerFactory` using a `DataSource` bean named `firstDataSource`.
314
-
It scans entities located in the same package as `Order`.
314
+
It scans entities located in the same package as `+Order+`.
315
315
It is possible to map additional JPA properties using the `app.first.jpa` namespace.
316
316
317
317
NOTE: When you create a bean for `LocalContainerEntityManagerFactoryBean` yourself, any customization that was applied during the creation of the auto-configured `LocalContainerEntityManagerFactoryBean` is lost.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/deployment/installing.adoc
+4-4
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ SuccessExitStatus=143
33
33
WantedBy=multi-user.target
34
34
----
35
35
36
-
IMPORTANT: Remember to change the `Description`, `User`, `Group`, `ExecStart` and `WorkingDirectory` fields for your application.
36
+
IMPORTANT: Remember to change the `+Description+`, `+User+`, `+Group+`, `+ExecStart+` and `+WorkingDirectory+` fields for your application.
37
37
38
-
NOTE: The `ExecStart` field does not declare the script action command, which means that the `run` command is used by default.
38
+
NOTE: The `+ExecStart+` field does not declare the script action command, which means that the `run` command is used by default.
39
39
40
40
The user that runs the application, the PID file, and the console log file are managed by `systemd` itself and therefore must be configured by using appropriate fields in the '`service`' script.
41
41
Consult the https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit configuration man page] for more details.
@@ -206,7 +206,7 @@ The following property substitutions are supported with the default script:
206
206
| `auto`
207
207
208
208
| `initInfoProvides`
209
-
| The `Provides` section of "`INIT INFO`"
209
+
| The `+Provides+` section of "`INIT INFO`"
210
210
| `${task.baseName}`
211
211
| `${project.artifactId}`
212
212
@@ -236,7 +236,7 @@ The following property substitutions are supported with the default script:
236
236
| `${project.name}`
237
237
238
238
| `initInfoDescription`
239
-
| `Description` section of "`INIT INFO`".
239
+
| `+Description+` section of "`INIT INFO`".
240
240
| `${project.description}` (falling back to `${task.baseName}`)
241
241
| `${project.description}` (falling back to `${project.name}`)
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/deployment/traditional-deployment.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ This means that, in addition to being deployable to a servlet container, you can
75
75
To convert an existing non-web Spring application to a Spring Boot application, replace the code that creates your `ApplicationContext` and replace it with calls to `SpringApplication` or `SpringApplicationBuilder`.
76
76
Spring MVC web applications are generally amenable to first creating a deployable war application and then migrating it later to an executable war or jar.
77
77
78
-
To create a deployable war by extending `SpringBootServletInitializer` (for example, in a class called `Application`) and adding the Spring Boot `@SpringBootApplication` annotation, use code similar to that shown in the following example:
78
+
To create a deployable war by extending `SpringBootServletInitializer` (for example, in a class called `+Application+`) and adding the Spring Boot `@SpringBootApplication` annotation, use code similar to that shown in the following example:
79
79
80
80
include-code::MyApplication[tag=!main]
81
81
@@ -87,14 +87,14 @@ Static resources can be moved to `/public` (or `/static` or `/resources` or `/ME
87
87
The same applies to `messages.properties` (which Spring Boot automatically detects in the root of the classpath).
88
88
89
89
Vanilla usage of Spring `DispatcherServlet` and Spring Security should require no further changes.
90
-
If you have other features in your application (for instance, using other servlets or filters), you may need to add some configuration to your `Application` context, by replacing those elements from the `web.xml`, as follows:
90
+
If you have other features in your application (for instance, using other servlets or filters), you may need to add some configuration to your `+Application+` context, by replacing those elements from the `web.xml`, as follows:
91
91
92
92
* A `@Bean` of type `Servlet` or `ServletRegistrationBean` installs that bean in the container as if it were a `<servlet/>` and `<servlet-mapping/>` in `web.xml`.
93
93
* A `@Bean` of type `Filter` or `FilterRegistrationBean` behaves similarly (as a `<filter/>` and `<filter-mapping/>`).
94
94
* An `ApplicationContext` in an XML file can be added through an `@ImportResource` in your `Application`.
95
95
Alternatively, cases where annotation configuration is heavily used already can be recreated in a few lines as `@Bean` definitions.
96
96
97
-
Once the war file is working, you can make it executable by adding a `main` method to your `Application`, as shown in the following example:
97
+
Once the war file is working, you can make it executable by adding a `main` method to your `+Application+`, as shown in the following example:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/logging.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ dependencies {
168
168
169
169
NOTE: The Log4j starters gather together the dependencies for common logging requirements (such as having Tomcat use `java.util.logging` but configuring the output using Log4j 2).
170
170
171
-
NOTE: To ensure that debug logging performed using `java.util.logging` is routed into Log4j 2, configure its https://logging.apache.org/log4j/2.x/log4j-jul.html[JDK logging adapter] by setting the `java.util.logging.manager` system property to `org.apache.logging.log4j.jul.LogManager`.
171
+
NOTE: To ensure that debug logging performed using `java.util.logging` is routed into Log4j 2, configure its https://logging.apache.org/log4j/2.x/log4j-jul.html[JDK logging adapter] by setting the `java.util.logging.manager` system property to `+org.apache.logging.log4j.jul.LogManager+`.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/native-image/developing-your-first-application.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ There are two main ways to build a Spring Boot native image application:
7
7
* Using GraalVM Native Build Tools to generate a native executable.
8
8
9
9
TIP: The easiest way to start a new native Spring Boot project is to go to https://start.spring.io[start.spring.io], add the `GraalVM Native Support` dependency and generate the project.
10
-
The included `HELP.md` file will provide getting started hints.
10
+
The included `+HELP.md+` file will provide getting started hints.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/properties-and-configuration.adoc
The `${..}` style conflicts with Spring's own property placeholder mechanism.
94
94
To use Spring property placeholders together with automatic expansion, escape the Spring property placeholders as follows: `\${..}`.
95
95
@@ -154,7 +154,7 @@ You can also provide the following System properties (or environment variables)
154
154
No matter what you set in the environment, Spring Boot always loads `application.properties` as described above.
155
155
By default, if YAML is used, then files with the '`.yaml`' and '`.yml`' extensions are also added to the list.
156
156
157
-
TIP: If you want detailed information about the files that are being loaded you can xref:reference:features/logging.adoc#features.logging.log-levels[set the logging level] of `org.springframework.boot.context.config` to `trace`.
157
+
TIP: If you want detailed information about the files that are being loaded you can xref:reference:features/logging.adoc#features.logging.log-levels[set the logging level] of `+org.springframework.boot.context.config+` to `trace`.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/spring-mvc.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -205,7 +205,7 @@ If you add your own, you have to be aware of the order and in which position you
205
205
`WebMvcAutoConfiguration` adds the following `ViewResolvers` to your context:
206
206
207
207
* An `InternalResourceViewResolver` named '`defaultViewResolver`'.
208
-
This one locates physical resources that can be rendered by using the `DefaultServlet` (including static resources and JSP pages, if you use those).
208
+
This one locates physical resources that can be rendered by using the `+DefaultServlet+` (including static resources and JSP pages, if you use those).
209
209
It applies a prefix and a suffix to the view name and then looks for a physical resource with that path in the servlet context (the defaults are both empty but are accessible for external configuration through `spring.mvc.view.prefix` and `spring.mvc.view.suffix`).
210
210
You can override it by providing a bean of the same type.
211
211
* A `BeanNameViewResolver` named '`beanNameViewResolver`'.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/webserver.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -452,7 +452,7 @@ For more details, see the Jetty documentation.
452
452
If your application is running behind a proxy, a load-balancer or in the cloud, the request information (like the host, port, scheme...) might change along the way.
453
453
Your application may be running on `10.10.10.10:8080`, but HTTP clients should only see `example.org`.
454
454
455
-
https://tools.ietf.org/html/rfc7239[RFC7239 "Forwarded Headers"] defines the `Forwarded` HTTP header; proxies can use this header to provide information about the original request.
455
+
https://tools.ietf.org/html/rfc7239[RFC7239 "Forwarded Headers"] defines the `+Forwarded+` HTTP header; proxies can use this header to provide information about the original request.
456
456
You can configure your application to read those headers and automatically use that information when creating links and sending them to clients in HTTP 302 responses, JSON documents or HTML pages.
457
457
There are also non-standard headers, like `X-Forwarded-Host`, `X-Forwarded-Port`, `X-Forwarded-Proto`, `X-Forwarded-Ssl`, and `X-Forwarded-Prefix`.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc
+4-4
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ If your application is a web application (Spring MVC, Spring WebFlux, or Jersey)
108
108
109
109
| `logfile`
110
110
| Returns the contents of the logfile (if the `logging.file.name` or the `logging.file.path` property has been set).
111
-
Supports the use of the HTTP `Range` header to retrieve part of the log file's content.
111
+
Supports the use of the HTTP `+Range+` header to retrieve part of the log file's content.
112
112
113
113
| `prometheus`
114
114
| Exposes metrics in a format that can be scraped by a Prometheus server.
@@ -398,7 +398,7 @@ Operations on an endpoint receive input through their parameters.
398
398
When exposed over the web, the values for these parameters are taken from the URL's query parameters and from the JSON request body.
399
399
When exposed over JMX, the parameters are mapped to the parameters of the MBean's operations.
400
400
Parameters are required by default.
401
-
They can be made optional by annotating them with either `@javax.annotation.Nullable` or `@org.springframework.lang.Nullable`.
401
+
They can be made optional by annotating them with either `+@javax.annotation.Nullable+` or `@org.springframework.lang.Nullable`.
402
402
403
403
You can map each root property in the JSON request body to a parameter of the endpoint.
404
404
Consider the following JSON request body:
@@ -531,7 +531,7 @@ NOTE: Range requests are not supported when using Jersey.
531
531
==== Web Endpoint Security
532
532
533
533
An operation on a web endpoint or a web-specific endpoint extension can receive the current `java.security.Principal` or `org.springframework.boot.actuate.endpoint.SecurityContext` as a method parameter.
534
-
The former is typically used in conjunction with `@Nullable` to provide different behavior for authenticated and unauthenticated users.
534
+
The former is typically used in conjunction with either `+@javax.annotation.Nullable+` or `@org.springframework.lang.Nullable` to provide different behavior for authenticated and unauthenticated users.
535
535
The latter is typically used to perform authorization checks by using its `isUserInRole(String)` method.
536
536
537
537
@@ -989,7 +989,7 @@ Some external systems might not be shared by application instances, in which cas
989
989
Other external systems might not be essential to the application (the application could have circuit breakers and fallbacks), in which case they definitely should not be included.
990
990
Unfortunately, an external system that is shared by all application instances is common, and you have to make a judgement call: Include it in the readiness probe and expect that the application is taken out of service when the external service is down or leave it out and deal with failures higher up the stack, perhaps by using a circuit breaker in the caller.
991
991
992
-
NOTE: If all instances of an application are unready, a Kubernetes Service with `type=ClusterIP` or `NodePort` does not accept any incoming connections.
992
+
NOTE: If all instances of an application are unready, a Kubernetes Service with `type=ClusterIP` or `+NodePort+` does not accept any incoming connections.
993
993
There is no HTTP error response (503 and so on), since there is no connection.
994
994
A service with `type=LoadBalancer` might or might not accept connections, depending on the provider.
995
995
A service that has an explicit https://kubernetes.io/docs/concepts/services-networking/ingress/[ingress] also responds in a way that depends on the implementation -- the ingress service itself has to decide how to handle the "`connection refused`" from downstream.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -1261,7 +1261,7 @@ You can also add any number of `tag=KEY:VALUE` query parameters to the end of th
1261
1261
[TIP]
1262
1262
====
1263
1263
The reported measurements are the _sum_ of the statistics of all meters that match the meter name and any tags that have been applied.
1264
-
In the preceding example, the returned `Value` statistic is the sum of the maximum memory footprints of the "`Code Cache`", "`Compressed Class Space`", and "`Metaspace`" areas of the heap.
1264
+
In the preceding example, the returned `+Value+` statistic is the sum of the maximum memory footprints of the "`Code Cache`", "`Compressed Class Space`", and "`Metaspace`" areas of the heap.
1265
1265
If you wanted to see only the maximum size for the "`Metaspace`", you could add an additional `tag=id:Metaspace` -- that is, `/actuator/metrics/jvm.memory.max?tag=area:nonheap&tag=id:Metaspace`.
This will create an observation named "some-operation" with the tag "some-tag=some-value".
192
192
193
-
TIP: If you want to create a span without creating a metric, you need to use the {url-micrometer-tracing-docs}/api[lower-level `Tracer` API] from Micrometer.
193
+
TIP: If you want to create a span without creating a metric, you need to use the {url-micrometer-tracing-docs}/api[lower-level `+Tracer+` API] from Micrometer.
0 commit comments